diff options
author | Adrian Thurston <thurston@colm.net> | 2019-10-16 18:10:27 -0300 |
---|---|---|
committer | Adrian Thurston <thurston@colm.net> | 2019-10-16 18:10:27 -0300 |
commit | 0f2f005f69a15cc8d03f67f690c16369b6dcf4bd (patch) | |
tree | a058cbdd3f90da6675c1c47a5a4284c74f712201 /test | |
parent | 61f3c8db08f7f60e284f17cea2752fd49296a4b1 (diff) | |
download | colm-0f2f005f69a15cc8d03f67f690c16369b6dcf4bd.tar.gz |
test cases: don't rely on continue breaking from calling func loop
Using continue when the loop is in a calling function works in some versions of
bash, but not others. Not really sure what the status is, so just use a return
to bail on the case.
Diffstat (limited to 'test')
-rw-r--r-- | test/ragel.d/gentests.sh | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/test/ragel.d/gentests.sh b/test/ragel.d/gentests.sh index 2c40ee9c..57c54a91 100644 --- a/test/ragel.d/gentests.sh +++ b/test/ragel.d/gentests.sh @@ -366,7 +366,7 @@ function run_options() [ -n "$additional_cflags" ] && flags="$flags $additional_cflags" # If we have no compiler for the source program then skip it. - [ -z "$compiler" ] && continue + [ -z "$compiler" ] && return # Make sure that we are interested in the host language. echo "$langflags" | grep -qe $lang_opt || return @@ -384,7 +384,6 @@ function run_translate() { test_case=$1 - # Recompute the root. root=`basename $test_case` root=${root%.rl}; @@ -392,13 +391,13 @@ function run_translate() # Check if we should ignore the test case enabled=`sed '/@ENABLED:/s/^.*: *//p;d' $test_case` if [ -n "$enabled" ] || [ "$enabled" = true ]; then - continue; + return; fi # If the generated flag is given make sure that the test case is generated. is_generated=`sed '/@GENERATED:/s/^.*: *//p;d' $test_case` if [ "$is_generated" = true ] && [ "$allow_generated" != true ]; then - continue; + return; fi # Override the test case file name. @@ -426,7 +425,7 @@ function run_translate() lang=`sed '/@LANG:/s/^.*: *//p;d' $test_case` if [ -z "$lang" ]; then echo "$test_case: language unset"; >&2 - continue + return fi cases="" |