diff options
Diffstat (limited to 'tests/all.sh')
| -rwxr-xr-x | tests/all.sh | 26 |
1 files changed, 19 insertions, 7 deletions
diff --git a/tests/all.sh b/tests/all.sh index 1f745cdff079..04afdb391d0e 100755 --- a/tests/all.sh +++ b/tests/all.sh @@ -32,8 +32,9 @@ set -e script="$0" testdir=$(dirname "$script") -. "$testdir/../functions.sh" +. "$testdir/../scripts/functions.sh" +# Command-line processing. if [ "$#" -ge 1 ]; then d="$1" shift @@ -79,26 +80,30 @@ fi stars="***********************************************************************" printf '%s\n' "$stars" +# Set stuff for the correct calculator. if [ "$d" = "bc" ]; then halt="quit" else halt="q" fi +# I use these, so unset them to make the tests work. unset BC_ENV_ARGS unset BC_LINE_LENGTH unset DC_ENV_ARGS unset DC_LINE_LENGTH +# Get the list of tests that require extra math. +extra_required=$(cat "$testdir/extra_required.txt") + printf '\nRunning %s tests...\n\n' "$d" +# Run the tests one at a time. while read t; do - if [ "$extra" -eq 0 ]; then - if [ "$t" = "trunc" ] || [ "$t" = "places" ] || [ "$t" = "shift" ] || \ - [ "$t" = "lib2" ] || [ "$t" = "scientific" ] || [ "$t" = "rand" ] || \ - [ "$t" = "engineering" ] - then + # If it requires extra, then skip if we don't have it. + if [ "$extra" -eq 0 ]; then + if [ -z "${extra_required##*$t*}" ]; then printf 'Skipping %s %s\n' "$d" "$t" continue fi @@ -108,14 +113,21 @@ while read t; do done < "$testdir/$d/all.txt" +# stdin tests. sh "$testdir/stdin.sh" "$d" "$exe" "$@" +# Script tests. sh "$testdir/scripts.sh" "$d" "$extra" "$run_stack_tests" "$generate_tests" \ "$time_tests" "$exe" "$@" + +# Read tests. sh "$testdir/read.sh" "$d" "$exe" "$@" + +# Error tests. sh "$testdir/errors.sh" "$d" "$exe" "$@" -sh "$testdir/other.sh" "$d" "$exe" "$@" +# Other tests. +sh "$testdir/other.sh" "$d" "$extra" "$exe" "$@" printf '\nAll %s tests passed.\n' "$d" |
