summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2007-09-15 08:11:30 +0000
committerMike Frysinger <vapier@gentoo.org>2007-09-15 08:11:30 +0000
commitb9a82d5b22c68a57e6a9fa51cc4d1ec507f266a5 (patch)
tree9ddb13cadf6ae8db7d8e7a10cb53b986fae595ed /test
parentc0441bbed5d817b4f8f7f27f5d066760f73d6bbc (diff)
add more tests as suggested by Natanael Copa and as harvested from:
http://www.freebsd.org/cgi/query-pr.cgi?pr=kern/92880
Diffstat (limited to 'test')
-rw-r--r--test/inet/tst-network.c32
1 files changed, 31 insertions, 1 deletions
diff --git a/test/inet/tst-network.c b/test/inet/tst-network.c
index 564a366a4..fa8aaf68c 100644
--- a/test/inet/tst-network.c
+++ b/test/inet/tst-network.c
@@ -43,7 +43,37 @@ struct
{"1.1410.", INADDR_NONE},
{"1.1410", INADDR_NONE},
{"141.76.1111", INADDR_NONE},
- {"141.76.1111.", INADDR_NONE}
+ {"141.76.1111.", INADDR_NONE},
+ /* Now some from BSD */
+ {"0x12", 0x00000012},
+ {"127.1", 0x00007f01},
+ {"127.1.2.3", 0x7f010203},
+ {"0x123456", INADDR_NONE},
+ {"0x12.0x34", 0x00001234},
+ {"0x12.0x345", INADDR_NONE},
+ {"1.2.3.4.5", INADDR_NONE},
+ {"1..3.4", INADDR_NONE},
+ {".", INADDR_NONE},
+ {"1.", INADDR_NONE},
+ {".1", INADDR_NONE},
+ {"x", INADDR_NONE},
+ {"0x", INADDR_NONE},
+ {"0", 0x00000000},
+ {"0x0", 0x00000000},
+ {"01.02.07.077", 0x0102073f},
+ {"0x1.23.045.0", 0x01172500},
+ {"", INADDR_NONE},
+ {" ", INADDR_NONE},
+ {"bar", INADDR_NONE},
+ {"1.2bar", INADDR_NONE},
+ {"1.", INADDR_NONE},
+ {"йцукен", INADDR_NONE},
+ {"255.255.255.255", INADDR_NONE},
+ {"x", INADDR_NONE},
+ {"0X12", 0x00000012},
+ {"078", INADDR_NONE},
+ {"1 bar", INADDR_NONE},
+ {"127.0xfff", INADDR_NONE},
};