#!/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 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;