X-Git-Url: https://git.dlugolecki.net.pl/?a=blobdiff_plain;f=tests%2Fcommand%2Funderstand_bool_option.test;h=03a543963e120328b2dee7373e2cbf323c776290;hb=bba2a7fd86db452c2d9a1668ee649f6d4d51a581;hp=0a4562dfa08a0081ef988b84002685885325ca79;hpb=007a48a044dea23570111c19941de413e6a7f1a1;p=command.git diff --git a/tests/command/understand_bool_option.test b/tests/command/understand_bool_option.test index 0a4562d..03a5439 100755 --- a/tests/command/understand_bool_option.test +++ b/tests/command/understand_bool_option.test @@ -8,4 +8,14 @@ for t in 0 1; do fi done +for t in -2 -1 2 3 4 5 15; do + TEST=$($srcdir/command/option_test_command bool=$t) + if [ ! "$?" = "1" ]; then + echo "Command should not understand Option if value is different than: 0 or 1. Got: '$TEST'. Program exited with $? code." + return 1; + fi +done + +echo "Command understand Option correctly." + return 0;