mirror of
https://github.com/PowerShell/openssh-portable.git
synced 2025-07-31 01:35:11 +02:00
upstream: Add test for empty hostname with port.
OpenBSD-Regress-ID: e19e89d3c432b68997667efea44cf015bbe2a7e3
This commit is contained in:
parent
a29af853cf
commit
25bd659cc7
@ -1,4 +1,4 @@
|
|||||||
/* $OpenBSD: test_hpdelim.c,v 1.1 2022/02/04 07:53:44 dtucker Exp $ */
|
/* $OpenBSD: test_hpdelim.c,v 1.2 2022/02/06 22:58:33 dtucker Exp $ */
|
||||||
/*
|
/*
|
||||||
* Regress test for misc hpdelim() and co
|
* Regress test for misc hpdelim() and co
|
||||||
*
|
*
|
||||||
@ -39,6 +39,17 @@ test_hpdelim(void)
|
|||||||
DONE_STRING();
|
DONE_STRING();
|
||||||
TEST_DONE();
|
TEST_DONE();
|
||||||
|
|
||||||
|
TEST_START("hpdelim :port");
|
||||||
|
START_STRING(":1234");
|
||||||
|
cp = hpdelim(&str);
|
||||||
|
ASSERT_STRING_EQ(cp, "");
|
||||||
|
ASSERT_PTR_NE(str, NULL);
|
||||||
|
port = hpdelim(&str);
|
||||||
|
ASSERT_STRING_EQ(port, "1234");
|
||||||
|
ASSERT_PTR_EQ(str, NULL);
|
||||||
|
DONE_STRING();
|
||||||
|
TEST_DONE();
|
||||||
|
|
||||||
TEST_START("hpdelim host:port");
|
TEST_START("hpdelim host:port");
|
||||||
START_STRING("host:1234");
|
START_STRING("host:1234");
|
||||||
cp = hpdelim(&str);
|
cp = hpdelim(&str);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user