From: Rafał Długołęcki Date: Sat, 16 May 2015 09:38:08 +0000 (+0200) Subject: Add Boolean tests. X-Git-Tag: v0.2.1~9 X-Git-Url: https://git.dlugolecki.net.pl/?a=commitdiff_plain;h=007a48a044dea23570111c19941de413e6a7f1a1;p=command.git Add Boolean tests. --- diff --git a/tests/command/understand_bool_option.test b/tests/command/understand_bool_option.test new file mode 100755 index 0000000..0a4562d --- /dev/null +++ b/tests/command/understand_bool_option.test @@ -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. Expecting output: 'bool: $t', got: '$TEST'. Program exited with $? code." + return 1; + fi +done + +return 0;