aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBill Nottingham <notting@redhat.com>2009-07-29 16:48:49 -0400
committerBill Nottingham <notting@redhat.com>2009-07-29 16:48:49 -0400
commit05c3dddbb545edfee0afa6c5238357edb555a77d (patch)
treee646694fe529a5c99460ebcc3124faea39d6c095
parentea8b242b9ef95f9c4b30310a10c50fef8a071a36 (diff)
downloadinitscripts-05c3dddbb545edfee0afa6c5238357edb555a77d.tar
initscripts-05c3dddbb545edfee0afa6c5238357edb555a77d.tar.gz
initscripts-05c3dddbb545edfee0afa6c5238357edb555a77d.tar.bz2
initscripts-05c3dddbb545edfee0afa6c5238357edb555a77d.tar.xz
initscripts-05c3dddbb545edfee0afa6c5238357edb555a77d.zip
More tests.
-rwxr-xr-xsrc/ipcalc-tests4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/ipcalc-tests b/src/ipcalc-tests
index 25a38a98..53019cf4 100755
--- a/src/ipcalc-tests
+++ b/src/ipcalc-tests
@@ -67,12 +67,14 @@ TestSuccess "$bin -c 192.168.1.1"
TestSuccess "$bin -c -6 2a01:198:200:300::2"
TestSuccess "$bin -c -6 2a01:198:200:300:0000:0000:0000:2"
TestSuccess "$bin -c -6 2a01:0198:0200:0300:0000:0000:0000:0002"
+TestSuccess "$bin -c -6 ::1/128"
TestFailure "$bin -c -6 gggg::"
TestFailure "$bin -b -6 ::1/128"
TestFailure "$bin -c -4 -6 2a01:198:200:300:0000:0000:0000:2"
TestFailure "$bin -c -4 -6 127.0.0.1"
TestFailure "$bin -c -6 127.0.0.1"
+TestFailure "$bin -c ::1/999"
TestFailure "$bin -m 192.168.1.1/-1"
TestFailure "$bin -m 192.168.1.1/64"
TestFailure "$bin -m 192.168.1.1/99999"
@@ -88,6 +90,8 @@ TestOutput "$bin -m 172.16.59.222/22" "NETMASK=255.255.252.0"
TestOutput "$bin -m 192.168.1.1" "NETMASK=255.255.255.0"
TestOutput "$bin -m 10.1.2.3" "NETMASK=255.0.0.0"
TestOutput "$bin -m 129.22.4.3" "NETMASK=255.255.0.0"
+TestOutput "$bin -n 192.168.1.1/32" "NETWORK=192.168.1.1"
+TestOutput "$bin -n 192.168.1.1/0" "NETWORK=0.0.0.0"
echo "$exitcode test(s) failed."
exit $exitcode