Add Boolean tests.
authorRafał Długołęcki <rafal@dlugolecki.net.pl>
Sat, 16 May 2015 09:38:08 +0000 (11:38 +0200)
committerRafał Długołęcki <rafal@dlugolecki.net.pl>
Sat, 16 May 2015 09:38:08 +0000 (11:38 +0200)
tests/command/understand_bool_option.test [new file with mode: 0755]

diff --git a/tests/command/understand_bool_option.test b/tests/command/understand_bool_option.test
new file mode 100755 (executable)
index 0000000..0a4562d
--- /dev/null
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+for t in 0 1; do
+    TEST=$($srcdir/command/option_test_command bool=$t)
+    if [ ! "$TEST" = "bool: $t" ]; then
+        echo "Command should understand Option<bool>. Expecting output: 'bool: $t', got: '$TEST'. Program exited with $? code."
+        return 1;
+    fi
+done
+
+return 0;