From f7958972b1acbc87264ac86323d461b4be115c17 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Rafa=C5=82=20D=C5=82ugo=C5=82=C4=99cki?= Date: Sat, 16 May 2015 15:52:59 +0200 Subject: [PATCH] Improve tests on Option. --- tests/command/understand_bool_option.test | 10 ++++++++++ 1 file changed, 10 insertions(+) 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; -- 2.30.2