diff options
author | Nick Mathewson <nickm@torproject.org> | 2014-04-05 14:18:39 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2014-04-05 14:18:39 -0400 |
commit | eefa3ebc786fdfd3a642698822f8a0ade583996e (patch) | |
tree | 7601e83b046bb764b715e23b24e9d3710af52744 /src/test/test_addr.c | |
parent | 9c0a1adfa21f12e6682fa26d43fbf91bab4e6fc3 (diff) | |
download | tor-eefa3ebc786fdfd3a642698822f8a0ade583996e.tar.gz tor-eefa3ebc786fdfd3a642698822f8a0ade583996e.zip |
Add a test for default/port conflicts in tor_addr_port_parse
Diffstat (limited to 'src/test/test_addr.c')
-rw-r--r-- | src/test/test_addr.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/test/test_addr.c b/src/test/test_addr.c index 5452ee9070..6228fabad6 100644 --- a/src/test/test_addr.c +++ b/src/test/test_addr.c @@ -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: ; } |