about summary refs log tree commit diff
path: root/test/pamvalidate.test
diff options
context:
space:
mode:
Diffstat (limited to 'test/pamvalidate.test')
-rwxr-xr-xtest/pamvalidate.test17
1 files changed, 17 insertions, 0 deletions
diff --git a/test/pamvalidate.test b/test/pamvalidate.test
new file mode 100755
index 00000000..46dd1bfa
--- /dev/null
+++ b/test/pamvalidate.test
@@ -0,0 +1,17 @@
+#! /bin/bash
+# This script tests: pamvalidate
+# Also requires:
+
+echo "valid"
+echo -e "P1\n5 5\n01010\n10101\n01010\n00000\n11111\n" | pamvalidate -plain
+
+echo "not valid: Should print 0 four times"
+echo -e "P1\n5 5\n01010\n10101\n01010\n00000\n1111\n"  | pamvalidate | wc -c
+
+echo -e "P1\n5 5\n01010\n10102\n01010\n00001\n11111\n" | pamvalidate | wc -c
+
+echo -e "P1\n5\n01010\n10101\n01010\n00000\n11111\n" | pamvalidate | wc -c
+
+echo -e "P1\n5 5" | pamvalidate | wc -c
+
+