aboutsummaryrefslogtreecommitdiff
path: root/tests/004-missing_argument_for_option.sh
diff options
context:
space:
mode:
authorJan Sucan <jan@jansucan.com>2022-03-05 12:30:59 +0100
committerJan Sucan <jan@jansucan.com>2022-03-05 12:37:19 +0100
commit752230d7288cd8efd7606f7c4032077590fbac0f (patch)
tree118371aec0c2959645ef1d38a7a470d5c2a47e07 /tests/004-missing_argument_for_option.sh
parent04533dd4293e6ddef4682129fda4154295bed96d (diff)
tests: Add option parsing tests
Diffstat (limited to 'tests/004-missing_argument_for_option.sh')
-rw-r--r--tests/004-missing_argument_for_option.sh10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/004-missing_argument_for_option.sh b/tests/004-missing_argument_for_option.sh
new file mode 100644
index 0000000..071ea07
--- /dev/null
+++ b/tests/004-missing_argument_for_option.sh
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+source ./assert.sh
+
+PROGRAM_EXEC="$1"
+
+assert_error "missing argument for option '-b'" $PROGRAM_EXEC -b
+assert_error "missing argument for option '-s'" $PROGRAM_EXEC -s
+
+exit 0