about summary refs log tree commit diff
path: root/test/test-invalid.inc
diff options
context:
space:
mode:
Diffstat (limited to 'test/test-invalid.inc')
-rw-r--r--test/test-invalid.inc16
1 files changed, 16 insertions, 0 deletions
diff --git a/test/test-invalid.inc b/test/test-invalid.inc
new file mode 100644
index 00000000..e24cfd3f
--- /dev/null
+++ b/test/test-invalid.inc
@@ -0,0 +1,16 @@
+echo 1>&2
+echo "Invalid command-line argument combination(s)." 1>&2
+echo "Error message(s) should appear below the line." 1>&2
+echo "-----------------------------------------------------------" 1>&2
+
+tmpdir=${tmpdir:-/tmp}
+test_out=${tmpdir}/test_out
+
+# define function
+invCmd () { $1 > ${test_out} && \
+  printf "Unexpected success ${testcnt} " || printf "Expected failure ${testcnt} "
+  test -s ${test_out} && echo "unexpected output" || echo "(no output)"
+  rm -f ${test_out}
+  testcnt=$(($testcnt +1)); }
+
+testcnt=1