mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-12-06 19:41:15 +01:00
Add a test for default/port conflicts in tor_addr_port_parse
This commit is contained in:
@@ -785,6 +785,14 @@ test_addr_parse(void)
|
||||
&addr, &port, -1);
|
||||
test_assert(r == -1);
|
||||
|
||||
/* Make sure that the default port has lower priority than the real
|
||||
one */
|
||||
r= tor_addr_port_parse(LOG_DEBUG,
|
||||
"192.0.2.2:1337",
|
||||
&addr, &port, 200);
|
||||
test_assert(r == 0);
|
||||
tt_int_op(port,==,1337);
|
||||
|
||||
done:
|
||||
;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user