diff options
Diffstat (limited to 'Tests/FortranC/test_opt.sh.in')
-rwxr-xr-x | Tests/FortranC/test_opt.sh.in | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/Tests/FortranC/test_opt.sh.in b/Tests/FortranC/test_opt.sh.in new file mode 100755 index 0000000..f3d93dc --- /dev/null +++ b/Tests/FortranC/test_opt.sh.in @@ -0,0 +1,18 @@ +#!/bin/sh + +TEST_OPT_@ID@_FOUND=0 +ARGS="" +for a in "$@"; do + if [ "x${TEST_OPT_@ID@}" != "x" -a "x${TEST_OPT_@ID@}" = "x$a" ]; then + TEST_OPT_@ID@_FOUND=1 + else + ARGS="$ARGS \"$a\"" + fi +done + +if [ "x${TEST_OPT_@ID@}" != "x" -a "x${TEST_OPT_@ID@_FOUND}" != "x1" ]; then + echo "Not given option '${TEST_OPT_@ID@}' as expected!" + exit 1 +fi + +eval "\"@COMMAND@\"" "$ARGS" |