]> git.tuebingen.mpg.de Git - paraslash.git/blobdiff - t/t0000-help-output.sh
First draft of a test-suite.
[paraslash.git] / t / t0000-help-output.sh
diff --git a/t/t0000-help-output.sh b/t/t0000-help-output.sh
new file mode 100755 (executable)
index 0000000..fcc2c78
--- /dev/null
@@ -0,0 +1,20 @@
+#!/usr/bin/env bash
+
+test_description='Parse help output of all executables.
+
+Each paraslash executable supports the -h switch which instructs
+the program to print out all available options and to exit. This test
+checks whether this help output looks as expected.'
+
+. ${0%/*}/test-lib.sh
+
+grep_output()
+{
+       local regex='^  -h, --help'
+       $1 -h | grep "$regex"
+}
+
+for exe in $o_executables; do
+       test_expect_success "$exe" "grep_output $o_executables_dir/$exe"
+done
+test_done