diff --git a/spec/10-async.sh b/demo/01-async.sh similarity index 100% rename from spec/10-async.sh rename to demo/01-async.sh diff --git a/spec/14-parse-order.sh b/demo/02-parse-order.sh similarity index 100% rename from spec/14-parse-order.sh rename to demo/02-parse-order.sh diff --git a/spec/background-status.sh b/demo/03-background-status.sh similarity index 100% rename from spec/background-status.sh rename to demo/03-background-status.sh diff --git a/spec/coproc.py b/demo/coproc.py similarity index 100% rename from spec/coproc.py rename to demo/coproc.py diff --git a/spec/coproc.sh b/demo/coproc.sh similarity index 100% rename from spec/coproc.sh rename to demo/coproc.sh diff --git a/spec/hard-coded-descriptors.sh b/demo/hard-coded-descriptors.sh similarity index 100% rename from spec/hard-coded-descriptors.sh rename to demo/hard-coded-descriptors.sh diff --git a/spec/builtins-exec-here-doc-helper.sh b/spec/bin/builtins-exec-here-doc-helper.sh similarity index 100% rename from spec/builtins-exec-here-doc-helper.sh rename to spec/bin/builtins-exec-here-doc-helper.sh diff --git a/spec/builtins.test.sh b/spec/builtins.test.sh index 8f6deab2a4..4754c2a94c 100644 --- a/spec/builtins.test.sh +++ b/spec/builtins.test.sh @@ -12,7 +12,7 @@ echo 'to stderr' #### exec builtin with here doc # This has in a separate file because both code and data can be read from # stdin. -$SH $REPO_ROOT/spec/builtins-exec-here-doc-helper.sh +$SH $REPO_ROOT/spec/bin/builtins-exec-here-doc-helper.sh ## STDOUT: x=one y=two diff --git a/spec/toysh.test.sh b/spec/toysh.test.sh old mode 100755 new mode 100644 diff --git a/test/gold.sh b/test/gold.sh index 854f9e6729..cce4727804 100755 --- a/test/gold.sh +++ b/test/gold.sh @@ -131,6 +131,8 @@ readlink-case() { $GOLD_DIR/readlink.sh compare } +errexit() { _compare $GOLD_DIR/errexit.sh all; } + # Hm this isn't tickling the bug? errexit-confusion() { _compare $GOLD_DIR/errexit-confusion.sh run-for-release-OLD @@ -192,6 +194,7 @@ readonly -a PASSING=( gen-module-init readlink-case + errexit errexit-confusion parse-help diff --git a/spec/16-errexit.sh b/test/gold/errexit.sh similarity index 87% rename from spec/16-errexit.sh rename to test/gold/errexit.sh index 6ed2b139d4..c568fc54d0 100755 --- a/spec/16-errexit.sh +++ b/test/gold/errexit.sh @@ -106,4 +106,16 @@ test-func-with-and() { succeed && echo "OK 3" } +all() { + compgen -A function | egrep '^test-' | while read func; do + echo + echo "--- $func ---" + echo + set +o errexit + $0 $func + echo status=$? + set -o errexit + done +} + "$@"