summaryrefslogtreecommitdiff
path: root/src/test/test_util.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2018-10-30 09:05:42 -0400
committerNick Mathewson <nickm@torproject.org>2018-10-30 09:05:42 -0400
commit084924360aa937014aa4b86de1131e0a413e81de (patch)
tree565b4421c0df2d485e6dc1e7439ec8fa9382a807 /src/test/test_util.c
parentc19bb4d62e9bf3d969a6950e529a95e2f98b7e1c (diff)
parent1425549ca61cab8aa9476a25be0a31f726672bcc (diff)
downloadtor-084924360aa937014aa4b86de1131e0a413e81de.tar.gz
tor-084924360aa937014aa4b86de1131e0a413e81de.zip
Merge branch 'ticket23082_squashed'
Diffstat (limited to 'src/test/test_util.c')
-rw-r--r--src/test/test_util.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/test/test_util.c b/src/test/test_util.c
index 7bc1b7921a..1a71da2794 100644
--- a/src/test/test_util.c
+++ b/src/test/test_util.c
@@ -5808,6 +5808,18 @@ test_util_ipv4_validation(void *arg)
}
static void
+test_util_ipv6_validation(void *arg)
+{
+ (void)arg;
+
+ tt_assert(string_is_valid_ipv6_address("2a00:1450:401b:800::200e"));
+ tt_assert(!string_is_valid_ipv6_address("11:22::33:44:"));
+
+ done:
+ return;
+}
+
+static void
test_util_writepid(void *arg)
{
(void) arg;
@@ -6498,6 +6510,7 @@ struct testcase_t util_tests[] = {
UTIL_TEST(hostname_validation, 0),
UTIL_TEST(dest_validation_edgecase, 0),
UTIL_TEST(ipv4_validation, 0),
+ UTIL_TEST(ipv6_validation, 0),
UTIL_TEST(writepid, 0),
UTIL_TEST(get_avail_disk_space, 0),
UTIL_TEST(touch_file, 0),