From b9a82d5b22c68a57e6a9fa51cc4d1ec507f266a5 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Sat, 15 Sep 2007 08:11:30 +0000 Subject: add more tests as suggested by Natanael Copa and as harvested from: http://www.freebsd.org/cgi/query-pr.cgi?pr=kern/92880 --- test/inet/tst-network.c | 32 +++++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) (limited to 'test') 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}, }; -- cgit v1.2.3