diff --git a/Makefile b/Makefile index f7995a2a..14cb9960 100644 --- a/Makefile +++ b/Makefile @@ -33,7 +33,7 @@ uninstall: build dune uninstall $(INSTALL_ARGS) check: build - @ output=$$(./tests/run 2>&1) ; \ + @ output=$$(./tests/golden/run 2>&1) ; \ status=$$? ; \ echo "$$output" | tee tests.org ; \ exit $$status @@ -48,7 +48,7 @@ clean: dune clean rm -f bin lib doc rm -f tests.org - tests/run clean || true + tests/golden/run clean || true PACKAGE=$(shell echo morbig-`cat VERSION`) diff --git a/tests/README.md b/tests/README.md index 4c5bef99..9e52d503 100644 --- a/tests/README.md +++ b/tests/README.md @@ -1,29 +1,28 @@ -Morbig's Test Suite -=================== +# Morbig's Test Suite -Directories ------------ +## Golden tests -- `good/`: these adhere to the POSIX standard, and should be accepted. +Those are found in the `tests/golden/` directory. -- `bad/`: these do not adhere to the standard, and should be rejected. +### Directories -- `unspecified/`: cases where the standard says that the behavior is unspecified +This test suite contains four top-level directories corresponding to four +categories of tests, namely: +- `good/`: these adhere to the POSIX standard, and should be accepted. +- `bad/`: these do not adhere to the standard, and should be rejected. +- `unspecified/`: cases where the standard says that the behavior is unspecified - `unknown/`: cases where we could not figure out whether there are good, bad, or unspecified. -Good tests contain an `.expected` result, to which the output of Morbig will be -compared. A good test is said to yield un `unexpected` result if Morbig succeeds -but the output is not what was expected. A good test is said to fail if Morbig -fails. - -Good and bad tests may contain an `.open` file that specifies that the test in -question is “open”, that is there is an open issue corresponding to it. Those -tests may fail or succeed without making the whole test suite fail or succeed. +A test is a directory whose name finishes in `.t`. Such tests can be nested as +subdirectories of the four top-level ones at an arbitrary depth. Test +directories contain an input file `input.sh`. Good tests contain an additional +expectations file `expected.json`. Finally, tests may contain an `open` file +that specifies that the test in question has an open issue attached to it; such +tests are expected to fail. -How to add tests ----------------- +### How to add tests Tests are structured by the section of the policy concerned, whenever possible. Please add a comment at the beginning of the test file, explaining what is being diff --git a/tests/bad/2.2-quoting/2.2-1/escape_character/escaped_doublequote_in_backquotes.sh b/tests/golden/bad/2.2-quoting/2.2-1/escape-character/escaped-doublequote-in-backquotes.t/input.sh similarity index 100% rename from tests/bad/2.2-quoting/2.2-1/escape_character/escaped_doublequote_in_backquotes.sh rename to tests/golden/bad/2.2-quoting/2.2-1/escape-character/escaped-doublequote-in-backquotes.t/input.sh diff --git a/tests/bad/2.2-quoting/2.2-1/escape_character/escaped_doublequote_in_backquotes2.sh b/tests/golden/bad/2.2-quoting/2.2-1/escape-character/escaped-doublequote-in-backquotes2.t/input.sh similarity index 100% rename from tests/bad/2.2-quoting/2.2-1/escape_character/escaped_doublequote_in_backquotes2.sh rename to tests/golden/bad/2.2-quoting/2.2-1/escape-character/escaped-doublequote-in-backquotes2.t/input.sh diff --git a/tests/bad/2.3_token-recognition/2.3.1_alias_substitution/alias-in-function.sh b/tests/golden/bad/2.3-token-recognition/2.3.1-alias-substitution/alias-in-function.t/input.sh similarity index 100% rename from tests/bad/2.3_token-recognition/2.3.1_alias_substitution/alias-in-function.sh rename to tests/golden/bad/2.3-token-recognition/2.3.1-alias-substitution/alias-in-function.t/input.sh diff --git a/tests/bad/2.3_token-recognition/2.3.1_alias_substitution/nested-alias.sh b/tests/golden/bad/2.3-token-recognition/2.3.1-alias-substitution/nested-alias.t/input.sh similarity index 100% rename from tests/bad/2.3_token-recognition/2.3.1_alias_substitution/nested-alias.sh rename to tests/golden/bad/2.3-token-recognition/2.3.1-alias-substitution/nested-alias.t/input.sh diff --git a/tests/bad/2.3_token-recognition/2.3.1_alias_substitution/nested-unalias.sh b/tests/golden/bad/2.3-token-recognition/2.3.1-alias-substitution/nested-unalias.t/input.sh similarity index 100% rename from tests/bad/2.3_token-recognition/2.3.1_alias_substitution/nested-unalias.sh rename to tests/golden/bad/2.3-token-recognition/2.3.1-alias-substitution/nested-unalias.t/input.sh diff --git a/tests/bad/2.3_token-recognition/2.3.1_alias_substitution/unalias-in-function.sh b/tests/golden/bad/2.3-token-recognition/2.3.1-alias-substitution/unalias-in-function.t/input.sh similarity index 100% rename from tests/bad/2.3_token-recognition/2.3.1_alias_substitution/unalias-in-function.sh rename to tests/golden/bad/2.3-token-recognition/2.3.1-alias-substitution/unalias-in-function.t/input.sh diff --git a/tests/bad/2.3_token-recognition/crlf.sh b/tests/golden/bad/2.3-token-recognition/crlf.t/input.sh similarity index 100% rename from tests/bad/2.3_token-recognition/crlf.sh rename to tests/golden/bad/2.3-token-recognition/crlf.t/input.sh diff --git a/tests/bad/2.3_token-recognition/unterminated-backquote.sh b/tests/golden/bad/2.3-token-recognition/unterminated-backquote.t/input.sh similarity index 100% rename from tests/bad/2.3_token-recognition/unterminated-backquote.sh rename to tests/golden/bad/2.3-token-recognition/unterminated-backquote.t/input.sh diff --git a/tests/bad/2.3_token-recognition/unterminated-doublequotes.sh b/tests/golden/bad/2.3-token-recognition/unterminated-doublequotes.t/input.sh similarity index 100% rename from tests/bad/2.3_token-recognition/unterminated-doublequotes.sh rename to tests/golden/bad/2.3-token-recognition/unterminated-doublequotes.t/input.sh diff --git a/tests/bad/2.3_token-recognition/unterminated-parameter.sh b/tests/golden/bad/2.3-token-recognition/unterminated-parameter.t/input.sh similarity index 100% rename from tests/bad/2.3_token-recognition/unterminated-parameter.sh rename to tests/golden/bad/2.3-token-recognition/unterminated-parameter.t/input.sh diff --git a/tests/bad/2.3_token-recognition/unterminated-parameter.sh.open b/tests/golden/bad/2.3-token-recognition/unterminated-parameter.t/open similarity index 100% rename from tests/bad/2.3_token-recognition/unterminated-parameter.sh.open rename to tests/golden/bad/2.3-token-recognition/unterminated-parameter.t/open diff --git a/tests/bad/2.3_token-recognition/unterminated-singlequote.sh b/tests/golden/bad/2.3-token-recognition/unterminated-singlequote.t/input.sh similarity index 100% rename from tests/bad/2.3_token-recognition/unterminated-singlequote.sh rename to tests/golden/bad/2.3-token-recognition/unterminated-singlequote.t/input.sh diff --git a/tests/bad/2.6-word-expansions/2.6.3-command-substitutions/nested-backquotes.sh b/tests/golden/bad/2.6-word-expansions/2.6.3-command-substitutions/nested-backquotes.t/input.sh similarity index 100% rename from tests/bad/2.6-word-expansions/2.6.3-command-substitutions/nested-backquotes.sh rename to tests/golden/bad/2.6-word-expansions/2.6.3-command-substitutions/nested-backquotes.t/input.sh diff --git a/tests/bad/2.7-redirection/2.7.4-here-document/git-conflict.sh b/tests/golden/bad/2.7-redirection/2.7.4-here-document/git-conflict.t/input.sh similarity index 100% rename from tests/bad/2.7-redirection/2.7.4-here-document/git-conflict.sh rename to tests/golden/bad/2.7-redirection/2.7.4-here-document/git-conflict.t/input.sh diff --git a/tests/bad/2.7-redirection/2.7.4-here-documents/here-operator-as-delimiter b/tests/golden/bad/2.7-redirection/2.7.4-here-document/here-operator-as-delimiter.t/input.sh similarity index 100% rename from tests/bad/2.7-redirection/2.7.4-here-documents/here-operator-as-delimiter rename to tests/golden/bad/2.7-redirection/2.7.4-here-document/here-operator-as-delimiter.t/input.sh diff --git a/tests/bad/2.7-redirection/2.7.4-here-documents/invalid-word-as-delimiter b/tests/golden/bad/2.7-redirection/2.7.4-here-document/invalid-word-as-delimiter.t/input.sh similarity index 100% rename from tests/bad/2.7-redirection/2.7.4-here-documents/invalid-word-as-delimiter rename to tests/golden/bad/2.7-redirection/2.7.4-here-document/invalid-word-as-delimiter.t/input.sh diff --git a/tests/bad/2.7-redirection/2.7.4-here-documents/lonely-redirection-operator b/tests/golden/bad/2.7-redirection/2.7.4-here-document/lonely-redirection-operator.t/input.sh similarity index 100% rename from tests/bad/2.7-redirection/2.7.4-here-documents/lonely-redirection-operator rename to tests/golden/bad/2.7-redirection/2.7.4-here-document/lonely-redirection-operator.t/input.sh diff --git a/tests/bad/2.7-redirection/2.7.4-here-document/unterminated.sh b/tests/golden/bad/2.7-redirection/2.7.4-here-document/unterminated.t/input.sh similarity index 100% rename from tests/bad/2.7-redirection/2.7.4-here-document/unterminated.sh rename to tests/golden/bad/2.7-redirection/2.7.4-here-document/unterminated.t/input.sh diff --git a/tests/bad/2.7-redirection/2.7.4-here-document/unterminated2.sh b/tests/golden/bad/2.7-redirection/2.7.4-here-document/unterminated2.t/input.sh similarity index 100% rename from tests/bad/2.7-redirection/2.7.4-here-document/unterminated2.sh rename to tests/golden/bad/2.7-redirection/2.7.4-here-document/unterminated2.t/input.sh diff --git a/tests/bad/2.7-redirection/two-lines.sh b/tests/golden/bad/2.7-redirection/two-lines.t/input.sh similarity index 100% rename from tests/bad/2.7-redirection/two-lines.sh rename to tests/golden/bad/2.7-redirection/two-lines.t/input.sh diff --git a/tests/bad/2.9_shell-commands/2.9.2_pipelines/not-alone.sh b/tests/golden/bad/2.9-shell-commands/2.9.2-pipelines/not-alone.t/input.sh similarity index 100% rename from tests/bad/2.9_shell-commands/2.9.2_pipelines/not-alone.sh rename to tests/golden/bad/2.9-shell-commands/2.9.2-pipelines/not-alone.t/input.sh diff --git a/tests/bad/2.9_shell-commands/2.9.2_pipelines/not-twice.sh b/tests/golden/bad/2.9-shell-commands/2.9.2-pipelines/not-twice.t/input.sh similarity index 100% rename from tests/bad/2.9_shell-commands/2.9.2_pipelines/not-twice.sh rename to tests/golden/bad/2.9-shell-commands/2.9.2-pipelines/not-twice.t/input.sh diff --git a/tests/bad/2.9_shell-commands/2.9.2_pipelines/pipe-alone.sh b/tests/golden/bad/2.9-shell-commands/2.9.2-pipelines/pipe-alone.t/input.sh similarity index 100% rename from tests/bad/2.9_shell-commands/2.9.2_pipelines/pipe-alone.sh rename to tests/golden/bad/2.9-shell-commands/2.9.2-pipelines/pipe-alone.t/input.sh diff --git a/tests/bad/2.9_shell-commands/2.9.3_lists/and-alone.sh b/tests/golden/bad/2.9-shell-commands/2.9.3-lists/and-alone.t/input.sh similarity index 100% rename from tests/bad/2.9_shell-commands/2.9.3_lists/and-alone.sh rename to tests/golden/bad/2.9-shell-commands/2.9.3-lists/and-alone.t/input.sh diff --git a/tests/bad/2.9_shell-commands/2.9.3_lists/and-twice.sh b/tests/golden/bad/2.9-shell-commands/2.9.3-lists/and-twice.t/input.sh similarity index 100% rename from tests/bad/2.9_shell-commands/2.9.3_lists/and-twice.sh rename to tests/golden/bad/2.9-shell-commands/2.9.3-lists/and-twice.t/input.sh diff --git a/tests/bad/2.9_shell-commands/2.9.3_lists/and-unterminated.sh b/tests/golden/bad/2.9-shell-commands/2.9.3-lists/and-unterminated.t/input.sh similarity index 100% rename from tests/bad/2.9_shell-commands/2.9.3_lists/and-unterminated.sh rename to tests/golden/bad/2.9-shell-commands/2.9.3-lists/and-unterminated.t/input.sh diff --git a/tests/bad/2.9_shell-commands/2.9.3_lists/asynchronous-alone.sh b/tests/golden/bad/2.9-shell-commands/2.9.3-lists/asynchronous-alone.t/input.sh similarity index 100% rename from tests/bad/2.9_shell-commands/2.9.3_lists/asynchronous-alone.sh rename to tests/golden/bad/2.9-shell-commands/2.9.3-lists/asynchronous-alone.t/input.sh diff --git a/tests/bad/2.9_shell-commands/2.9.3_lists/asynchronous-twice.sh b/tests/golden/bad/2.9-shell-commands/2.9.3-lists/asynchronous-twice.t/input.sh similarity index 100% rename from tests/bad/2.9_shell-commands/2.9.3_lists/asynchronous-twice.sh rename to tests/golden/bad/2.9-shell-commands/2.9.3-lists/asynchronous-twice.t/input.sh diff --git a/tests/bad/2.9_shell-commands/2.9.3_lists/or-alone.sh b/tests/golden/bad/2.9-shell-commands/2.9.3-lists/or-alone.t/input.sh similarity index 100% rename from tests/bad/2.9_shell-commands/2.9.3_lists/or-alone.sh rename to tests/golden/bad/2.9-shell-commands/2.9.3-lists/or-alone.t/input.sh diff --git a/tests/bad/2.9_shell-commands/2.9.3_lists/or-unterminated.sh b/tests/golden/bad/2.9-shell-commands/2.9.3-lists/or-unterminated.t/input.sh similarity index 100% rename from tests/bad/2.9_shell-commands/2.9.3_lists/or-unterminated.sh rename to tests/golden/bad/2.9-shell-commands/2.9.3-lists/or-unterminated.t/input.sh diff --git a/tests/bad/2.9_shell-commands/2.9.4_compound-commands/case/no-dsemi.sh b/tests/golden/bad/2.9-shell-commands/2.9.4-compound-commands/case/no-dsemi.t/input.sh similarity index 100% rename from tests/bad/2.9_shell-commands/2.9.4_compound-commands/case/no-dsemi.sh rename to tests/golden/bad/2.9-shell-commands/2.9.4-compound-commands/case/no-dsemi.t/input.sh diff --git a/tests/bad/2.9_shell-commands/2.9.4_compound-commands/case/no-esac.sh b/tests/golden/bad/2.9-shell-commands/2.9.4-compound-commands/case/no-esac.t/input.sh similarity index 100% rename from tests/bad/2.9_shell-commands/2.9.4_compound-commands/case/no-esac.sh rename to tests/golden/bad/2.9-shell-commands/2.9.4-compound-commands/case/no-esac.t/input.sh diff --git a/tests/bad/2.9_shell-commands/2.9.4_compound-commands/case/no-in.sh b/tests/golden/bad/2.9-shell-commands/2.9.4-compound-commands/case/no-in.t/input.sh similarity index 100% rename from tests/bad/2.9_shell-commands/2.9.4_compound-commands/case/no-in.sh rename to tests/golden/bad/2.9-shell-commands/2.9.4-compound-commands/case/no-in.t/input.sh diff --git a/tests/bad/2.9_shell-commands/2.9.4_compound-commands/case/wrong-keyword.sh b/tests/golden/bad/2.9-shell-commands/2.9.4-compound-commands/case/wrong-keyword.t/input.sh similarity index 100% rename from tests/bad/2.9_shell-commands/2.9.4_compound-commands/case/wrong-keyword.sh rename to tests/golden/bad/2.9-shell-commands/2.9.4-compound-commands/case/wrong-keyword.t/input.sh diff --git a/tests/bad/2.9_shell-commands/2.9.4_compound-commands/case/wrong-keyword2.sh b/tests/golden/bad/2.9-shell-commands/2.9.4-compound-commands/case/wrong-keyword2.t/input.sh similarity index 100% rename from tests/bad/2.9_shell-commands/2.9.4_compound-commands/case/wrong-keyword2.sh rename to tests/golden/bad/2.9-shell-commands/2.9.4-compound-commands/case/wrong-keyword2.t/input.sh diff --git a/tests/bad/2.9_shell-commands/2.9.4_compound-commands/dogroup-alone.sh b/tests/golden/bad/2.9-shell-commands/2.9.4-compound-commands/dogroup-alone.t/input.sh similarity index 100% rename from tests/bad/2.9_shell-commands/2.9.4_compound-commands/dogroup-alone.sh rename to tests/golden/bad/2.9-shell-commands/2.9.4-compound-commands/dogroup-alone.t/input.sh diff --git a/tests/bad/2.9_shell-commands/2.9.4_compound-commands/for/do-semicolon.sh b/tests/golden/bad/2.9-shell-commands/2.9.4-compound-commands/for/do-semicolon.t/input.sh similarity index 100% rename from tests/bad/2.9_shell-commands/2.9.4_compound-commands/for/do-semicolon.sh rename to tests/golden/bad/2.9-shell-commands/2.9.4-compound-commands/for/do-semicolon.t/input.sh diff --git a/tests/bad/2.9_shell-commands/2.9.4_compound-commands/for/empty.sh b/tests/golden/bad/2.9-shell-commands/2.9.4-compound-commands/for/empty.t/input.sh similarity index 100% rename from tests/bad/2.9_shell-commands/2.9.4_compound-commands/for/empty.sh rename to tests/golden/bad/2.9-shell-commands/2.9.4-compound-commands/for/empty.t/input.sh diff --git a/tests/bad/2.9_shell-commands/2.9.4_compound-commands/for/other-keyword.sh b/tests/golden/bad/2.9-shell-commands/2.9.4-compound-commands/for/other-keyword.t/input.sh similarity index 100% rename from tests/bad/2.9_shell-commands/2.9.4_compound-commands/for/other-keyword.sh rename to tests/golden/bad/2.9-shell-commands/2.9.4-compound-commands/for/other-keyword.t/input.sh diff --git a/tests/bad/2.9_shell-commands/2.9.4_compound-commands/for/without-do.sh b/tests/golden/bad/2.9-shell-commands/2.9.4-compound-commands/for/without-do.t/input.sh similarity index 100% rename from tests/bad/2.9_shell-commands/2.9.4_compound-commands/for/without-do.sh rename to tests/golden/bad/2.9-shell-commands/2.9.4-compound-commands/for/without-do.t/input.sh diff --git a/tests/bad/2.9_shell-commands/2.9.4_compound-commands/for/without-done.sh b/tests/golden/bad/2.9-shell-commands/2.9.4-compound-commands/for/without-done.t/input.sh similarity index 100% rename from tests/bad/2.9_shell-commands/2.9.4_compound-commands/for/without-done.sh rename to tests/golden/bad/2.9-shell-commands/2.9.4-compound-commands/for/without-done.t/input.sh diff --git a/tests/bad/2.9_shell-commands/2.9.4_compound-commands/grouping/bracegroup-no-delimiter.sh b/tests/golden/bad/2.9-shell-commands/2.9.4-compound-commands/grouping/bracegroup-no-delimiter.t/input.sh similarity index 100% rename from tests/bad/2.9_shell-commands/2.9.4_compound-commands/grouping/bracegroup-no-delimiter.sh rename to tests/golden/bad/2.9-shell-commands/2.9.4-compound-commands/grouping/bracegroup-no-delimiter.t/input.sh diff --git a/tests/bad/2.9_shell-commands/2.9.4_compound-commands/grouping/bracegroup-no-space.sh b/tests/golden/bad/2.9-shell-commands/2.9.4-compound-commands/grouping/bracegroup-no-space.t/input.sh similarity index 100% rename from tests/bad/2.9_shell-commands/2.9.4_compound-commands/grouping/bracegroup-no-space.sh rename to tests/golden/bad/2.9-shell-commands/2.9.4-compound-commands/grouping/bracegroup-no-space.t/input.sh diff --git a/tests/bad/2.9_shell-commands/2.9.4_compound-commands/grouping/no-sep.sh b/tests/golden/bad/2.9-shell-commands/2.9.4-compound-commands/grouping/no-sep.t/input.sh similarity index 100% rename from tests/bad/2.9_shell-commands/2.9.4_compound-commands/grouping/no-sep.sh rename to tests/golden/bad/2.9-shell-commands/2.9.4-compound-commands/grouping/no-sep.t/input.sh diff --git a/tests/bad/2.9_shell-commands/2.9.4_compound-commands/grouping/unterminated-bracegroup.sh b/tests/golden/bad/2.9-shell-commands/2.9.4-compound-commands/grouping/unterminated-bracegroup.t/input.sh similarity index 100% rename from tests/bad/2.9_shell-commands/2.9.4_compound-commands/grouping/unterminated-bracegroup.sh rename to tests/golden/bad/2.9-shell-commands/2.9.4-compound-commands/grouping/unterminated-bracegroup.t/input.sh diff --git a/tests/bad/2.9_shell-commands/2.9.4_compound-commands/grouping/unterminated-parentheses.sh b/tests/golden/bad/2.9-shell-commands/2.9.4-compound-commands/grouping/unterminated-parentheses.t/input.sh similarity index 100% rename from tests/bad/2.9_shell-commands/2.9.4_compound-commands/grouping/unterminated-parentheses.sh rename to tests/golden/bad/2.9-shell-commands/2.9.4-compound-commands/grouping/unterminated-parentheses.t/input.sh diff --git a/tests/bad/2.9_shell-commands/2.9.4_compound-commands/grouping/unterminated-parentheses2.sh b/tests/golden/bad/2.9-shell-commands/2.9.4-compound-commands/grouping/unterminated-parentheses2.t/input.sh similarity index 100% rename from tests/bad/2.9_shell-commands/2.9.4_compound-commands/grouping/unterminated-parentheses2.sh rename to tests/golden/bad/2.9-shell-commands/2.9.4-compound-commands/grouping/unterminated-parentheses2.t/input.sh diff --git a/tests/bad/2.9_shell-commands/2.9.4_compound-commands/if/elif-alone.sh b/tests/golden/bad/2.9-shell-commands/2.9.4-compound-commands/if/elif-alone.t/input.sh similarity index 100% rename from tests/bad/2.9_shell-commands/2.9.4_compound-commands/if/elif-alone.sh rename to tests/golden/bad/2.9-shell-commands/2.9.4-compound-commands/if/elif-alone.t/input.sh diff --git a/tests/bad/2.9_shell-commands/2.9.4_compound-commands/if/else-alone.sh b/tests/golden/bad/2.9-shell-commands/2.9.4-compound-commands/if/else-alone.t/input.sh similarity index 100% rename from tests/bad/2.9_shell-commands/2.9.4_compound-commands/if/else-alone.sh rename to tests/golden/bad/2.9-shell-commands/2.9.4-compound-commands/if/else-alone.t/input.sh diff --git a/tests/bad/2.9_shell-commands/2.9.4_compound-commands/if/fi-alone.sh b/tests/golden/bad/2.9-shell-commands/2.9.4-compound-commands/if/fi-alone.t/input.sh similarity index 100% rename from tests/bad/2.9_shell-commands/2.9.4_compound-commands/if/fi-alone.sh rename to tests/golden/bad/2.9-shell-commands/2.9.4-compound-commands/if/fi-alone.t/input.sh diff --git a/tests/bad/2.9_shell-commands/2.9.4_compound-commands/if/fi-no-sep-2.sh b/tests/golden/bad/2.9-shell-commands/2.9.4-compound-commands/if/fi-no-sep-2.t/input.sh similarity index 100% rename from tests/bad/2.9_shell-commands/2.9.4_compound-commands/if/fi-no-sep-2.sh rename to tests/golden/bad/2.9-shell-commands/2.9.4-compound-commands/if/fi-no-sep-2.t/input.sh diff --git a/tests/bad/2.9_shell-commands/2.9.4_compound-commands/if/fi-no-sep.sh b/tests/golden/bad/2.9-shell-commands/2.9.4-compound-commands/if/fi-no-sep.t/input.sh similarity index 100% rename from tests/bad/2.9_shell-commands/2.9.4_compound-commands/if/fi-no-sep.sh rename to tests/golden/bad/2.9-shell-commands/2.9.4-compound-commands/if/fi-no-sep.t/input.sh diff --git a/tests/bad/2.9_shell-commands/2.9.4_compound-commands/if/if-double-semicolon.sh b/tests/golden/bad/2.9-shell-commands/2.9.4-compound-commands/if/if-double-semicolon.t/input.sh similarity index 100% rename from tests/bad/2.9_shell-commands/2.9.4_compound-commands/if/if-double-semicolon.sh rename to tests/golden/bad/2.9-shell-commands/2.9.4-compound-commands/if/if-double-semicolon.t/input.sh diff --git a/tests/bad/2.9_shell-commands/2.9.4_compound-commands/if/if-elif-no-fi.sh b/tests/golden/bad/2.9-shell-commands/2.9.4-compound-commands/if/if-elif-no-fi.t/input.sh similarity index 100% rename from tests/bad/2.9_shell-commands/2.9.4_compound-commands/if/if-elif-no-fi.sh rename to tests/golden/bad/2.9-shell-commands/2.9.4-compound-commands/if/if-elif-no-fi.t/input.sh diff --git a/tests/bad/2.9_shell-commands/2.9.4_compound-commands/if/if-elif-no-then.sh b/tests/golden/bad/2.9-shell-commands/2.9.4-compound-commands/if/if-elif-no-then.t/input.sh similarity index 100% rename from tests/bad/2.9_shell-commands/2.9.4_compound-commands/if/if-elif-no-then.sh rename to tests/golden/bad/2.9-shell-commands/2.9.4-compound-commands/if/if-elif-no-then.t/input.sh diff --git a/tests/bad/2.9_shell-commands/2.9.4_compound-commands/if/if-else-no-fi.sh b/tests/golden/bad/2.9-shell-commands/2.9.4-compound-commands/if/if-else-no-fi.t/input.sh similarity index 100% rename from tests/bad/2.9_shell-commands/2.9.4_compound-commands/if/if-else-no-fi.sh rename to tests/golden/bad/2.9-shell-commands/2.9.4-compound-commands/if/if-else-no-fi.t/input.sh diff --git a/tests/bad/2.9_shell-commands/2.9.4_compound-commands/if/no-fi.sh b/tests/golden/bad/2.9-shell-commands/2.9.4-compound-commands/if/no-fi.t/input.sh similarity index 100% rename from tests/bad/2.9_shell-commands/2.9.4_compound-commands/if/no-fi.sh rename to tests/golden/bad/2.9-shell-commands/2.9.4-compound-commands/if/no-fi.t/input.sh diff --git a/tests/bad/2.9_shell-commands/2.9.4_compound-commands/if/no-sep-2.sh b/tests/golden/bad/2.9-shell-commands/2.9.4-compound-commands/if/no-sep-2.t/input.sh similarity index 100% rename from tests/bad/2.9_shell-commands/2.9.4_compound-commands/if/no-sep-2.sh rename to tests/golden/bad/2.9-shell-commands/2.9.4-compound-commands/if/no-sep-2.t/input.sh diff --git a/tests/bad/2.9_shell-commands/2.9.4_compound-commands/if/no-sep.sh b/tests/golden/bad/2.9-shell-commands/2.9.4-compound-commands/if/no-sep.t/input.sh similarity index 100% rename from tests/bad/2.9_shell-commands/2.9.4_compound-commands/if/no-sep.sh rename to tests/golden/bad/2.9-shell-commands/2.9.4-compound-commands/if/no-sep.t/input.sh diff --git a/tests/bad/2.9_shell-commands/2.9.4_compound-commands/if/no-then.sh b/tests/golden/bad/2.9-shell-commands/2.9.4-compound-commands/if/no-then.t/input.sh similarity index 100% rename from tests/bad/2.9_shell-commands/2.9.4_compound-commands/if/no-then.sh rename to tests/golden/bad/2.9-shell-commands/2.9.4-compound-commands/if/no-then.t/input.sh diff --git a/tests/bad/2.9_shell-commands/2.9.4_compound-commands/if/then-no-sep-2.sh b/tests/golden/bad/2.9-shell-commands/2.9.4-compound-commands/if/then-no-sep-2.t/input.sh similarity index 100% rename from tests/bad/2.9_shell-commands/2.9.4_compound-commands/if/then-no-sep-2.sh rename to tests/golden/bad/2.9-shell-commands/2.9.4-compound-commands/if/then-no-sep-2.t/input.sh diff --git a/tests/bad/2.9_shell-commands/2.9.4_compound-commands/if/then-no-sep.sh b/tests/golden/bad/2.9-shell-commands/2.9.4-compound-commands/if/then-no-sep.t/input.sh similarity index 100% rename from tests/bad/2.9_shell-commands/2.9.4_compound-commands/if/then-no-sep.sh rename to tests/golden/bad/2.9-shell-commands/2.9.4-compound-commands/if/then-no-sep.t/input.sh diff --git a/tests/bad/2.9_shell-commands/2.9.4_compound-commands/until/no-do.sh b/tests/golden/bad/2.9-shell-commands/2.9.4-compound-commands/until/no-do.t/input.sh similarity index 100% rename from tests/bad/2.9_shell-commands/2.9.4_compound-commands/until/no-do.sh rename to tests/golden/bad/2.9-shell-commands/2.9.4-compound-commands/until/no-do.t/input.sh diff --git a/tests/bad/2.9_shell-commands/2.9.4_compound-commands/until/no-done.sh b/tests/golden/bad/2.9-shell-commands/2.9.4-compound-commands/until/no-done.t/input.sh similarity index 100% rename from tests/bad/2.9_shell-commands/2.9.4_compound-commands/until/no-done.sh rename to tests/golden/bad/2.9-shell-commands/2.9.4-compound-commands/until/no-done.t/input.sh diff --git a/tests/bad/2.9_shell-commands/2.9.4_compound-commands/until/no-semicolon-before-do.sh b/tests/golden/bad/2.9-shell-commands/2.9.4-compound-commands/until/no-semicolon-before-do.t/input.sh similarity index 100% rename from tests/bad/2.9_shell-commands/2.9.4_compound-commands/until/no-semicolon-before-do.sh rename to tests/golden/bad/2.9-shell-commands/2.9.4-compound-commands/until/no-semicolon-before-do.t/input.sh diff --git a/tests/bad/2.9_shell-commands/2.9.4_compound-commands/until/no-semicolon-before-done.sh b/tests/golden/bad/2.9-shell-commands/2.9.4-compound-commands/until/no-semicolon-before-done.t/input.sh similarity index 100% rename from tests/bad/2.9_shell-commands/2.9.4_compound-commands/until/no-semicolon-before-done.sh rename to tests/golden/bad/2.9-shell-commands/2.9.4-compound-commands/until/no-semicolon-before-done.t/input.sh diff --git a/tests/bad/2.9_shell-commands/2.9.4_compound-commands/while/no-do.sh b/tests/golden/bad/2.9-shell-commands/2.9.4-compound-commands/while/no-do.t/input.sh similarity index 100% rename from tests/bad/2.9_shell-commands/2.9.4_compound-commands/while/no-do.sh rename to tests/golden/bad/2.9-shell-commands/2.9.4-compound-commands/while/no-do.t/input.sh diff --git a/tests/bad/2.9_shell-commands/2.9.4_compound-commands/while/no-done.sh b/tests/golden/bad/2.9-shell-commands/2.9.4-compound-commands/while/no-done.t/input.sh similarity index 100% rename from tests/bad/2.9_shell-commands/2.9.4_compound-commands/while/no-done.sh rename to tests/golden/bad/2.9-shell-commands/2.9.4-compound-commands/while/no-done.t/input.sh diff --git a/tests/bad/2.9_shell-commands/2.9.4_compound-commands/while/no-semicolon-before-do.sh b/tests/golden/bad/2.9-shell-commands/2.9.4-compound-commands/while/no-semicolon-before-do.t/input.sh similarity index 100% rename from tests/bad/2.9_shell-commands/2.9.4_compound-commands/while/no-semicolon-before-do.sh rename to tests/golden/bad/2.9-shell-commands/2.9.4-compound-commands/while/no-semicolon-before-do.t/input.sh diff --git a/tests/bad/2.9_shell-commands/2.9.4_compound-commands/while/no-semicolon-before-done.sh b/tests/golden/bad/2.9-shell-commands/2.9.4-compound-commands/while/no-semicolon-before-done.t/input.sh similarity index 100% rename from tests/bad/2.9_shell-commands/2.9.4_compound-commands/while/no-semicolon-before-done.sh rename to tests/golden/bad/2.9-shell-commands/2.9.4-compound-commands/while/no-semicolon-before-done.t/input.sh diff --git a/tests/bad/2.9_shell-commands/2.9.5_function-definition-command/multiple-names.sh b/tests/golden/bad/2.9-shell-commands/2.9.5-function-definition-command/multiple-names.t/input.sh similarity index 100% rename from tests/bad/2.9_shell-commands/2.9.5_function-definition-command/multiple-names.sh rename to tests/golden/bad/2.9-shell-commands/2.9.5-function-definition-command/multiple-names.t/input.sh diff --git a/tests/bad/bashisms/function.sh b/tests/golden/bad/bashisms/function.t/input.sh similarity index 100% rename from tests/bad/bashisms/function.sh rename to tests/golden/bad/bashisms/function.t/input.sh diff --git a/tests/bad/here-document-and-quotes.sh b/tests/golden/bad/here-document-and-quotes.t/input.sh similarity index 100% rename from tests/bad/here-document-and-quotes.sh rename to tests/golden/bad/here-document-and-quotes.t/input.sh diff --git a/tests/bad/here-document-and-quotes.sh.open b/tests/golden/bad/here-document-and-quotes.t/open similarity index 100% rename from tests/bad/here-document-and-quotes.sh.open rename to tests/golden/bad/here-document-and-quotes.t/open diff --git a/tests/good/2.1-shell-introduction/README b/tests/golden/good/2.1-shell-introduction/README.md similarity index 100% rename from tests/good/2.1-shell-introduction/README rename to tests/golden/good/2.1-shell-introduction/README.md diff --git a/tests/good/2.10-shell-grammar/2.10.2-shell-grammar-rules/line-joining-before-tokenization.sh.expected b/tests/golden/good/2.10-shell-grammar/2.10.2-shell-grammar-rules/line-joining-before-tokenization.t/expected.json similarity index 100% rename from tests/good/2.10-shell-grammar/2.10.2-shell-grammar-rules/line-joining-before-tokenization.sh.expected rename to tests/golden/good/2.10-shell-grammar/2.10.2-shell-grammar-rules/line-joining-before-tokenization.t/expected.json diff --git a/tests/good/2.10-shell-grammar/2.10.2-shell-grammar-rules/line-joining-before-tokenization.sh b/tests/golden/good/2.10-shell-grammar/2.10.2-shell-grammar-rules/line-joining-before-tokenization.t/input.sh similarity index 100% rename from tests/good/2.10-shell-grammar/2.10.2-shell-grammar-rules/line-joining-before-tokenization.sh rename to tests/golden/good/2.10-shell-grammar/2.10.2-shell-grammar-rules/line-joining-before-tokenization.t/input.sh diff --git a/tests/good/2.13-pattern-matching-notation/any.sh.expected b/tests/golden/good/2.13-pattern-matching-notation/any.t/expected.json similarity index 100% rename from tests/good/2.13-pattern-matching-notation/any.sh.expected rename to tests/golden/good/2.13-pattern-matching-notation/any.t/expected.json diff --git a/tests/good/2.13-pattern-matching-notation/any.sh b/tests/golden/good/2.13-pattern-matching-notation/any.t/input.sh similarity index 100% rename from tests/good/2.13-pattern-matching-notation/any.sh rename to tests/golden/good/2.13-pattern-matching-notation/any.t/input.sh diff --git a/tests/good/2.13-pattern-matching-notation/bracket-expressions.sh.expected b/tests/golden/good/2.13-pattern-matching-notation/bracket-expressions.t/expected.json similarity index 100% rename from tests/good/2.13-pattern-matching-notation/bracket-expressions.sh.expected rename to tests/golden/good/2.13-pattern-matching-notation/bracket-expressions.t/expected.json diff --git a/tests/good/2.13-pattern-matching-notation/bracket-expressions.sh b/tests/golden/good/2.13-pattern-matching-notation/bracket-expressions.t/input.sh similarity index 100% rename from tests/good/2.13-pattern-matching-notation/bracket-expressions.sh rename to tests/golden/good/2.13-pattern-matching-notation/bracket-expressions.t/input.sh diff --git a/tests/good/2.2-quoting/2.2.1-escape_character/backslash_after-equal.sh.expected b/tests/golden/good/2.2-quoting/2.2.1-escape-character/backslash-after-equal.t/expected.json similarity index 100% rename from tests/good/2.2-quoting/2.2.1-escape_character/backslash_after-equal.sh.expected rename to tests/golden/good/2.2-quoting/2.2.1-escape-character/backslash-after-equal.t/expected.json diff --git a/tests/good/2.2-quoting/2.2.1-escape_character/backslash_after-equal.sh b/tests/golden/good/2.2-quoting/2.2.1-escape-character/backslash-after-equal.t/input.sh similarity index 100% rename from tests/good/2.2-quoting/2.2.1-escape_character/backslash_after-equal.sh rename to tests/golden/good/2.2-quoting/2.2.1-escape-character/backslash-after-equal.t/input.sh diff --git a/tests/good/2.2-quoting/2.2.1-escape_character/escaped_doublequote_in_backquotes.sh.expected b/tests/golden/good/2.2-quoting/2.2.1-escape-character/escaped-doublequote-in-backquotes.t/expected.json similarity index 100% rename from tests/good/2.2-quoting/2.2.1-escape_character/escaped_doublequote_in_backquotes.sh.expected rename to tests/golden/good/2.2-quoting/2.2.1-escape-character/escaped-doublequote-in-backquotes.t/expected.json diff --git a/tests/good/2.2-quoting/2.2.1-escape_character/escaped_doublequote_in_backquotes.sh b/tests/golden/good/2.2-quoting/2.2.1-escape-character/escaped-doublequote-in-backquotes.t/input.sh similarity index 100% rename from tests/good/2.2-quoting/2.2.1-escape_character/escaped_doublequote_in_backquotes.sh rename to tests/golden/good/2.2-quoting/2.2.1-escape-character/escaped-doublequote-in-backquotes.t/input.sh diff --git a/tests/good/2.2-quoting/2.2.1-escape_character/layout.sh.expected b/tests/golden/good/2.2-quoting/2.2.1-escape-character/layout.t/expected.json similarity index 100% rename from tests/good/2.2-quoting/2.2.1-escape_character/layout.sh.expected rename to tests/golden/good/2.2-quoting/2.2.1-escape-character/layout.t/expected.json diff --git a/tests/good/2.2-quoting/2.2.1-escape_character/layout.sh b/tests/golden/good/2.2-quoting/2.2.1-escape-character/layout.t/input.sh similarity index 100% rename from tests/good/2.2-quoting/2.2.1-escape_character/layout.sh rename to tests/golden/good/2.2-quoting/2.2.1-escape-character/layout.t/input.sh diff --git a/tests/good/2.2-quoting/2.2.1-escape_character/quoting_doublequotes.sh.expected b/tests/golden/good/2.2-quoting/2.2.1-escape-character/quoting-doublequotes.t/expected.json similarity index 100% rename from tests/good/2.2-quoting/2.2.1-escape_character/quoting_doublequotes.sh.expected rename to tests/golden/good/2.2-quoting/2.2.1-escape-character/quoting-doublequotes.t/expected.json diff --git a/tests/good/2.2-quoting/2.2.1-escape_character/quoting_doublequotes.sh b/tests/golden/good/2.2-quoting/2.2.1-escape-character/quoting-doublequotes.t/input.sh similarity index 100% rename from tests/good/2.2-quoting/2.2.1-escape_character/quoting_doublequotes.sh rename to tests/golden/good/2.2-quoting/2.2.1-escape-character/quoting-doublequotes.t/input.sh diff --git a/tests/good/2.2-quoting/2.2.1-escape_character/quoting_escape-character.sh.expected b/tests/golden/good/2.2-quoting/2.2.1-escape-character/quoting-escape-character.t/expected.json similarity index 100% rename from tests/good/2.2-quoting/2.2.1-escape_character/quoting_escape-character.sh.expected rename to tests/golden/good/2.2-quoting/2.2.1-escape-character/quoting-escape-character.t/expected.json diff --git a/tests/good/2.2-quoting/2.2.1-escape_character/quoting_escape-character.sh b/tests/golden/good/2.2-quoting/2.2.1-escape-character/quoting-escape-character.t/input.sh similarity index 100% rename from tests/good/2.2-quoting/2.2.1-escape_character/quoting_escape-character.sh rename to tests/golden/good/2.2-quoting/2.2.1-escape-character/quoting-escape-character.t/input.sh diff --git a/tests/good/2.2-quoting/2.2.2-single_quotes/quotes-in-substitution.sh.expected b/tests/golden/good/2.2-quoting/2.2.2-single-quotes/quotes-in-substitution.t/expected.json similarity index 100% rename from tests/good/2.2-quoting/2.2.2-single_quotes/quotes-in-substitution.sh.expected rename to tests/golden/good/2.2-quoting/2.2.2-single-quotes/quotes-in-substitution.t/expected.json diff --git a/tests/good/2.2-quoting/2.2.2-single_quotes/quotes-in-substitution.sh b/tests/golden/good/2.2-quoting/2.2.2-single-quotes/quotes-in-substitution.t/input.sh similarity index 100% rename from tests/good/2.2-quoting/2.2.2-single_quotes/quotes-in-substitution.sh rename to tests/golden/good/2.2-quoting/2.2.2-single-quotes/quotes-in-substitution.t/input.sh diff --git a/tests/good/2.2-quoting/2.2.2-single_quotes/quoting_single-quotes.sh.expected b/tests/golden/good/2.2-quoting/2.2.2-single-quotes/quoting-single-quotes.t/expected.json similarity index 100% rename from tests/good/2.2-quoting/2.2.2-single_quotes/quoting_single-quotes.sh.expected rename to tests/golden/good/2.2-quoting/2.2.2-single-quotes/quoting-single-quotes.t/expected.json diff --git a/tests/good/2.2-quoting/2.2.2-single_quotes/quoting_single-quotes.sh b/tests/golden/good/2.2-quoting/2.2.2-single-quotes/quoting-single-quotes.t/input.sh similarity index 100% rename from tests/good/2.2-quoting/2.2.2-single_quotes/quoting_single-quotes.sh rename to tests/golden/good/2.2-quoting/2.2.2-single-quotes/quoting-single-quotes.t/input.sh diff --git a/tests/good/2.2-quoting/2.2.3-double_quotes/quoting_double-quotes.sh.expected b/tests/golden/good/2.2-quoting/2.2.3-double-quotes/quoting-double-quotes.t/expected.json similarity index 100% rename from tests/good/2.2-quoting/2.2.3-double_quotes/quoting_double-quotes.sh.expected rename to tests/golden/good/2.2-quoting/2.2.3-double-quotes/quoting-double-quotes.t/expected.json diff --git a/tests/good/2.2-quoting/2.2.3-double_quotes/quoting_double-quotes.sh b/tests/golden/good/2.2-quoting/2.2.3-double-quotes/quoting-double-quotes.t/input.sh similarity index 100% rename from tests/good/2.2-quoting/2.2.3-double_quotes/quoting_double-quotes.sh rename to tests/golden/good/2.2-quoting/2.2.3-double-quotes/quoting-double-quotes.t/input.sh diff --git a/tests/good/2.2-quoting/2.2.3-double_quotes/single-quotes-in-double-quotes.sh.expected b/tests/golden/good/2.2-quoting/2.2.3-double-quotes/single-quotes-in-double-quotes.t/expected.json similarity index 100% rename from tests/good/2.2-quoting/2.2.3-double_quotes/single-quotes-in-double-quotes.sh.expected rename to tests/golden/good/2.2-quoting/2.2.3-double-quotes/single-quotes-in-double-quotes.t/expected.json diff --git a/tests/good/2.2-quoting/2.2.3-double_quotes/single-quotes-in-double-quotes.sh b/tests/golden/good/2.2-quoting/2.2.3-double-quotes/single-quotes-in-double-quotes.t/input.sh similarity index 100% rename from tests/good/2.2-quoting/2.2.3-double_quotes/single-quotes-in-double-quotes.sh rename to tests/golden/good/2.2-quoting/2.2.3-double-quotes/single-quotes-in-double-quotes.t/input.sh diff --git a/tests/good/2.2-quoting/dquotes-backquote-paren.sh.expected b/tests/golden/good/2.2-quoting/dquotes-backquote-paren.t/expected.json similarity index 100% rename from tests/good/2.2-quoting/dquotes-backquote-paren.sh.expected rename to tests/golden/good/2.2-quoting/dquotes-backquote-paren.t/expected.json diff --git a/tests/good/2.2-quoting/dquotes-backquote-paren.sh b/tests/golden/good/2.2-quoting/dquotes-backquote-paren.t/input.sh similarity index 100% rename from tests/good/2.2-quoting/dquotes-backquote-paren.sh rename to tests/golden/good/2.2-quoting/dquotes-backquote-paren.t/input.sh diff --git a/tests/good/2.2-quoting/quotations.sh.expected b/tests/golden/good/2.2-quoting/quotations.t/expected.json similarity index 100% rename from tests/good/2.2-quoting/quotations.sh.expected rename to tests/golden/good/2.2-quoting/quotations.t/expected.json diff --git a/tests/good/2.2-quoting/quotations.sh b/tests/golden/good/2.2-quoting/quotations.t/input.sh similarity index 100% rename from tests/good/2.2-quoting/quotations.sh rename to tests/golden/good/2.2-quoting/quotations.t/input.sh diff --git a/tests/good/2.2-quoting/quoting-equal-sign.sh.expected b/tests/golden/good/2.2-quoting/quoting-equal-sign.t/expected.json similarity index 100% rename from tests/good/2.2-quoting/quoting-equal-sign.sh.expected rename to tests/golden/good/2.2-quoting/quoting-equal-sign.t/expected.json diff --git a/tests/good/2.2-quoting/quoting-equal-sign.sh b/tests/golden/good/2.2-quoting/quoting-equal-sign.t/input.sh similarity index 100% rename from tests/good/2.2-quoting/quoting-equal-sign.sh rename to tests/golden/good/2.2-quoting/quoting-equal-sign.t/input.sh diff --git a/tests/good/2.3-token-recognition/2.3.1-alias-substitution/alias-alias.sh.expected b/tests/golden/good/2.3-token-recognition/2.3.1-alias-substitution/alias-alias.t/expected.json similarity index 100% rename from tests/good/2.3-token-recognition/2.3.1-alias-substitution/alias-alias.sh.expected rename to tests/golden/good/2.3-token-recognition/2.3.1-alias-substitution/alias-alias.t/expected.json diff --git a/tests/good/2.3-token-recognition/2.3.1-alias-substitution/alias-alias.sh b/tests/golden/good/2.3-token-recognition/2.3.1-alias-substitution/alias-alias.t/input.sh similarity index 100% rename from tests/good/2.3-token-recognition/2.3.1-alias-substitution/alias-alias.sh rename to tests/golden/good/2.3-token-recognition/2.3.1-alias-substitution/alias-alias.t/input.sh diff --git a/tests/good/2.3-token-recognition/2.3.1-alias-substitution/alias-commands-words-only.sh.expected b/tests/golden/good/2.3-token-recognition/2.3.1-alias-substitution/alias-commands-words-only.t/expected.json similarity index 100% rename from tests/good/2.3-token-recognition/2.3.1-alias-substitution/alias-commands-words-only.sh.expected rename to tests/golden/good/2.3-token-recognition/2.3.1-alias-substitution/alias-commands-words-only.t/expected.json diff --git a/tests/good/2.3-token-recognition/2.3.1-alias-substitution/alias-commands-words-only.sh b/tests/golden/good/2.3-token-recognition/2.3.1-alias-substitution/alias-commands-words-only.t/input.sh similarity index 100% rename from tests/good/2.3-token-recognition/2.3.1-alias-substitution/alias-commands-words-only.sh rename to tests/golden/good/2.3-token-recognition/2.3.1-alias-substitution/alias-commands-words-only.t/input.sh diff --git a/tests/good/2.3-token-recognition/2.3.1-alias-substitution/alias-cycle.sh.expected b/tests/golden/good/2.3-token-recognition/2.3.1-alias-substitution/alias-cycle.t/expected.json similarity index 100% rename from tests/good/2.3-token-recognition/2.3.1-alias-substitution/alias-cycle.sh.expected rename to tests/golden/good/2.3-token-recognition/2.3.1-alias-substitution/alias-cycle.t/expected.json diff --git a/tests/good/2.3-token-recognition/2.3.1-alias-substitution/alias-cycle.sh b/tests/golden/good/2.3-token-recognition/2.3.1-alias-substitution/alias-cycle.t/input.sh similarity index 100% rename from tests/good/2.3-token-recognition/2.3.1-alias-substitution/alias-cycle.sh rename to tests/golden/good/2.3-token-recognition/2.3.1-alias-substitution/alias-cycle.t/input.sh diff --git a/tests/good/2.3-token-recognition/2.3.1-alias-substitution/alias-mixed-arguments.sh.expected b/tests/golden/good/2.3-token-recognition/2.3.1-alias-substitution/alias-mixed-arguments.t/expected.json similarity index 100% rename from tests/good/2.3-token-recognition/2.3.1-alias-substitution/alias-mixed-arguments.sh.expected rename to tests/golden/good/2.3-token-recognition/2.3.1-alias-substitution/alias-mixed-arguments.t/expected.json diff --git a/tests/good/2.3-token-recognition/2.3.1-alias-substitution/alias-mixed-arguments.sh b/tests/golden/good/2.3-token-recognition/2.3.1-alias-substitution/alias-mixed-arguments.t/input.sh similarity index 100% rename from tests/good/2.3-token-recognition/2.3.1-alias-substitution/alias-mixed-arguments.sh rename to tests/golden/good/2.3-token-recognition/2.3.1-alias-substitution/alias-mixed-arguments.t/input.sh diff --git a/tests/good/2.3-token-recognition/2.3.1-alias-substitution/alias-multiple-arguments.sh.expected b/tests/golden/good/2.3-token-recognition/2.3.1-alias-substitution/alias-multiple-arguments.t/expected.json similarity index 100% rename from tests/good/2.3-token-recognition/2.3.1-alias-substitution/alias-multiple-arguments.sh.expected rename to tests/golden/good/2.3-token-recognition/2.3.1-alias-substitution/alias-multiple-arguments.t/expected.json diff --git a/tests/good/2.3-token-recognition/2.3.1-alias-substitution/alias-multiple-arguments.sh b/tests/golden/good/2.3-token-recognition/2.3.1-alias-substitution/alias-multiple-arguments.t/input.sh similarity index 100% rename from tests/good/2.3-token-recognition/2.3.1-alias-substitution/alias-multiple-arguments.sh rename to tests/golden/good/2.3-token-recognition/2.3.1-alias-substitution/alias-multiple-arguments.t/input.sh diff --git a/tests/good/2.3-token-recognition/2.3.1-alias-substitution/alias-unalias-without-arguments.sh.expected b/tests/golden/good/2.3-token-recognition/2.3.1-alias-substitution/alias-unalias-without-arguments.t/expected.json similarity index 100% rename from tests/good/2.3-token-recognition/2.3.1-alias-substitution/alias-unalias-without-arguments.sh.expected rename to tests/golden/good/2.3-token-recognition/2.3.1-alias-substitution/alias-unalias-without-arguments.t/expected.json diff --git a/tests/good/2.3-token-recognition/2.3.1-alias-substitution/alias-unalias-without-arguments.sh b/tests/golden/good/2.3-token-recognition/2.3.1-alias-substitution/alias-unalias-without-arguments.t/input.sh similarity index 100% rename from tests/good/2.3-token-recognition/2.3.1-alias-substitution/alias-unalias-without-arguments.sh rename to tests/golden/good/2.3-token-recognition/2.3.1-alias-substitution/alias-unalias-without-arguments.t/input.sh diff --git a/tests/good/2.3-token-recognition/2.3.1-alias-substitution/alias-with-final-whitespace.sh.expected b/tests/golden/good/2.3-token-recognition/2.3.1-alias-substitution/alias-with-final-whitespace.t/expected.json similarity index 100% rename from tests/good/2.3-token-recognition/2.3.1-alias-substitution/alias-with-final-whitespace.sh.expected rename to tests/golden/good/2.3-token-recognition/2.3.1-alias-substitution/alias-with-final-whitespace.t/expected.json diff --git a/tests/good/2.3-token-recognition/2.3.1-alias-substitution/alias-with-final-whitespace.sh b/tests/golden/good/2.3-token-recognition/2.3.1-alias-substitution/alias-with-final-whitespace.t/input.sh similarity index 100% rename from tests/good/2.3-token-recognition/2.3.1-alias-substitution/alias-with-final-whitespace.sh rename to tests/golden/good/2.3-token-recognition/2.3.1-alias-substitution/alias-with-final-whitespace.t/input.sh diff --git a/tests/good/2.3-token-recognition/2.3.1-alias-substitution/alias-without-argument.sh.expected b/tests/golden/good/2.3-token-recognition/2.3.1-alias-substitution/alias-without-argument.t/expected.json similarity index 100% rename from tests/good/2.3-token-recognition/2.3.1-alias-substitution/alias-without-argument.sh.expected rename to tests/golden/good/2.3-token-recognition/2.3.1-alias-substitution/alias-without-argument.t/expected.json diff --git a/tests/good/2.3-token-recognition/2.3.1-alias-substitution/toplevel-alias.sh.expected b/tests/golden/good/2.3-token-recognition/2.3.1-alias-substitution/toplevel-alias.t/expected.json similarity index 100% rename from tests/good/2.3-token-recognition/2.3.1-alias-substitution/toplevel-alias.sh.expected rename to tests/golden/good/2.3-token-recognition/2.3.1-alias-substitution/toplevel-alias.t/expected.json diff --git a/tests/good/2.3-token-recognition/2.3.1-alias-substitution/toplevel-alias.sh b/tests/golden/good/2.3-token-recognition/2.3.1-alias-substitution/toplevel-alias.t/input.sh similarity index 100% rename from tests/good/2.3-token-recognition/2.3.1-alias-substitution/toplevel-alias.sh rename to tests/golden/good/2.3-token-recognition/2.3.1-alias-substitution/toplevel-alias.t/input.sh diff --git a/tests/good/2.3-token-recognition/2.3.1-alias-substitution/toplevel-unalias.sh.expected b/tests/golden/good/2.3-token-recognition/2.3.1-alias-substitution/toplevel-unalias.t/expected.json similarity index 100% rename from tests/good/2.3-token-recognition/2.3.1-alias-substitution/toplevel-unalias.sh.expected rename to tests/golden/good/2.3-token-recognition/2.3.1-alias-substitution/toplevel-unalias.t/expected.json diff --git a/tests/good/2.3-token-recognition/2.3.1-alias-substitution/toplevel-unalias.sh b/tests/golden/good/2.3-token-recognition/2.3.1-alias-substitution/toplevel-unalias.t/input.sh similarity index 100% rename from tests/good/2.3-token-recognition/2.3.1-alias-substitution/toplevel-unalias.sh rename to tests/golden/good/2.3-token-recognition/2.3.1-alias-substitution/toplevel-unalias.t/input.sh diff --git a/tests/good/2.3-token-recognition/2.3.1-alias-substitution/unalias-a.sh.expected b/tests/golden/good/2.3-token-recognition/2.3.1-alias-substitution/unalias-a.t/expected.json similarity index 100% rename from tests/good/2.3-token-recognition/2.3.1-alias-substitution/unalias-a.sh.expected rename to tests/golden/good/2.3-token-recognition/2.3.1-alias-substitution/unalias-a.t/expected.json diff --git a/tests/good/2.3-token-recognition/2.3.1-alias-substitution/unalias-a.sh b/tests/golden/good/2.3-token-recognition/2.3.1-alias-substitution/unalias-a.t/input.sh similarity index 100% rename from tests/good/2.3-token-recognition/2.3.1-alias-substitution/unalias-a.sh rename to tests/golden/good/2.3-token-recognition/2.3.1-alias-substitution/unalias-a.t/input.sh diff --git a/tests/good/2.3-token-recognition/2.3.1-alias-substitution/unalias-multiple-arguments.sh.expected b/tests/golden/good/2.3-token-recognition/2.3.1-alias-substitution/unalias-multiple-arguments.t/expected.json similarity index 100% rename from tests/good/2.3-token-recognition/2.3.1-alias-substitution/unalias-multiple-arguments.sh.expected rename to tests/golden/good/2.3-token-recognition/2.3.1-alias-substitution/unalias-multiple-arguments.t/expected.json diff --git a/tests/good/2.3-token-recognition/2.3.1-alias-substitution/unalias-multiple-arguments.sh b/tests/golden/good/2.3-token-recognition/2.3.1-alias-substitution/unalias-multiple-arguments.t/input.sh similarity index 100% rename from tests/good/2.3-token-recognition/2.3.1-alias-substitution/unalias-multiple-arguments.sh rename to tests/golden/good/2.3-token-recognition/2.3.1-alias-substitution/unalias-multiple-arguments.t/input.sh diff --git a/tests/good/2.3-token-recognition/arithmetic-and-parentheses.sh b/tests/golden/good/2.3-token-recognition/arithmetic-and-parentheses.t/input.sh similarity index 100% rename from tests/good/2.3-token-recognition/arithmetic-and-parentheses.sh rename to tests/golden/good/2.3-token-recognition/arithmetic-and-parentheses.t/input.sh diff --git a/tests/good/2.3-token-recognition/arithmetic-and-parentheses.sh.open b/tests/golden/good/2.3-token-recognition/arithmetic-and-parentheses.t/open similarity index 100% rename from tests/good/2.3-token-recognition/arithmetic-and-parentheses.sh.open rename to tests/golden/good/2.3-token-recognition/arithmetic-and-parentheses.t/open diff --git a/tests/good/2.3-token-recognition/for-do.sh.expected b/tests/golden/good/2.3-token-recognition/for-do.t/expected.json similarity index 100% rename from tests/good/2.3-token-recognition/for-do.sh.expected rename to tests/golden/good/2.3-token-recognition/for-do.t/expected.json diff --git a/tests/good/2.3-token-recognition/for-do.sh b/tests/golden/good/2.3-token-recognition/for-do.t/input.sh similarity index 100% rename from tests/good/2.3-token-recognition/for-do.sh rename to tests/golden/good/2.3-token-recognition/for-do.t/input.sh diff --git a/tests/good/2.3-token-recognition/subshell_equal.sh.expected b/tests/golden/good/2.3-token-recognition/subshell-equal.t/expected.json similarity index 100% rename from tests/good/2.3-token-recognition/subshell_equal.sh.expected rename to tests/golden/good/2.3-token-recognition/subshell-equal.t/expected.json diff --git a/tests/good/2.3-token-recognition/subshell_equal.sh b/tests/golden/good/2.3-token-recognition/subshell-equal.t/input.sh similarity index 100% rename from tests/good/2.3-token-recognition/subshell_equal.sh rename to tests/golden/good/2.3-token-recognition/subshell-equal.t/input.sh diff --git a/tests/good/2.3-token-recognition/subshell_hash.sh b/tests/golden/good/2.3-token-recognition/subshell-hash.t/input.sh similarity index 100% rename from tests/good/2.3-token-recognition/subshell_hash.sh rename to tests/golden/good/2.3-token-recognition/subshell-hash.t/input.sh diff --git a/tests/good/2.3-token-recognition/subshell_hash.sh.open b/tests/golden/good/2.3-token-recognition/subshell-hash.t/open similarity index 100% rename from tests/good/2.3-token-recognition/subshell_hash.sh.open rename to tests/golden/good/2.3-token-recognition/subshell-hash.t/open diff --git a/tests/good/2.3-token-recognition/weird.sh.expected b/tests/golden/good/2.3-token-recognition/weird.t/expected.json similarity index 100% rename from tests/good/2.3-token-recognition/weird.sh.expected rename to tests/golden/good/2.3-token-recognition/weird.t/expected.json diff --git a/tests/good/2.3-token-recognition/weird.sh b/tests/golden/good/2.3-token-recognition/weird.t/input.sh similarity index 100% rename from tests/good/2.3-token-recognition/weird.sh rename to tests/golden/good/2.3-token-recognition/weird.t/input.sh diff --git a/tests/good/2.4-reserved_words/keyword-after-keyword.sh b/tests/golden/good/2.4-reserved-words/keyword-after-keyword.t/input.sh similarity index 100% rename from tests/good/2.4-reserved_words/keyword-after-keyword.sh rename to tests/golden/good/2.4-reserved-words/keyword-after-keyword.t/input.sh diff --git a/tests/good/2.4-reserved_words/keyword-after-keyword.sh.open b/tests/golden/good/2.4-reserved-words/keyword-after-keyword.t/open similarity index 100% rename from tests/good/2.4-reserved_words/keyword-after-keyword.sh.open rename to tests/golden/good/2.4-reserved-words/keyword-after-keyword.t/open diff --git a/tests/good/2.4-reserved_words/keywords-not-quoted.sh.expected b/tests/golden/good/2.4-reserved-words/keywords-not-quoted.t/expected.json similarity index 100% rename from tests/good/2.4-reserved_words/keywords-not-quoted.sh.expected rename to tests/golden/good/2.4-reserved-words/keywords-not-quoted.t/expected.json diff --git a/tests/good/2.4-reserved_words/keywords-not-quoted.sh b/tests/golden/good/2.4-reserved-words/keywords-not-quoted.t/input.sh similarity index 100% rename from tests/good/2.4-reserved_words/keywords-not-quoted.sh rename to tests/golden/good/2.4-reserved-words/keywords-not-quoted.t/input.sh diff --git a/tests/good/2.4-reserved_words/keywords.sh.expected b/tests/golden/good/2.4-reserved-words/keywords.t/expected.json similarity index 100% rename from tests/good/2.4-reserved_words/keywords.sh.expected rename to tests/golden/good/2.4-reserved-words/keywords.t/expected.json diff --git a/tests/good/2.4-reserved_words/keywords.sh b/tests/golden/good/2.4-reserved-words/keywords.t/input.sh similarity index 100% rename from tests/good/2.4-reserved_words/keywords.sh rename to tests/golden/good/2.4-reserved-words/keywords.t/input.sh diff --git a/tests/good/2.6-word-expansions/2.6.1-tilde-prefix/login.sh.expected b/tests/golden/good/2.6-word-expansions/2.6.1-tilde-prefix/login.t/expected.json similarity index 100% rename from tests/good/2.6-word-expansions/2.6.1-tilde-prefix/login.sh.expected rename to tests/golden/good/2.6-word-expansions/2.6.1-tilde-prefix/login.t/expected.json diff --git a/tests/good/2.6-word-expansions/2.6.1-tilde-prefix/login.sh b/tests/golden/good/2.6-word-expansions/2.6.1-tilde-prefix/login.t/input.sh similarity index 100% rename from tests/good/2.6-word-expansions/2.6.1-tilde-prefix/login.sh rename to tests/golden/good/2.6-word-expansions/2.6.1-tilde-prefix/login.t/input.sh diff --git a/tests/good/2.6-word-expansions/2.6.2-parameter-expansion/basic.sh.expected b/tests/golden/good/2.6-word-expansions/2.6.2-parameter-expansion/basic.t/expected.json similarity index 100% rename from tests/good/2.6-word-expansions/2.6.2-parameter-expansion/basic.sh.expected rename to tests/golden/good/2.6-word-expansions/2.6.2-parameter-expansion/basic.t/expected.json diff --git a/tests/good/2.6-word-expansions/2.6.2-parameter-expansion/basic.sh b/tests/golden/good/2.6-word-expansions/2.6.2-parameter-expansion/basic.t/input.sh similarity index 100% rename from tests/good/2.6-word-expansions/2.6.2-parameter-expansion/basic.sh rename to tests/golden/good/2.6-word-expansions/2.6.2-parameter-expansion/basic.t/input.sh diff --git a/tests/good/2.6-word-expansions/2.6.2-parameter-expansion/operator-in-parameter.sh.expected b/tests/golden/good/2.6-word-expansions/2.6.2-parameter-expansion/operator-in-parameter.t/expected.json similarity index 100% rename from tests/good/2.6-word-expansions/2.6.2-parameter-expansion/operator-in-parameter.sh.expected rename to tests/golden/good/2.6-word-expansions/2.6.2-parameter-expansion/operator-in-parameter.t/expected.json diff --git a/tests/good/2.6-word-expansions/2.6.2-parameter-expansion/operator-in-parameter.sh b/tests/golden/good/2.6-word-expansions/2.6.2-parameter-expansion/operator-in-parameter.t/input.sh similarity index 100% rename from tests/good/2.6-word-expansions/2.6.2-parameter-expansion/operator-in-parameter.sh rename to tests/golden/good/2.6-word-expansions/2.6.2-parameter-expansion/operator-in-parameter.t/input.sh diff --git a/tests/good/2.6-word-expansions/2.6.2-parameter-expansion/recursive.sh.expected b/tests/golden/good/2.6-word-expansions/2.6.2-parameter-expansion/recursive.t/expected.json similarity index 100% rename from tests/good/2.6-word-expansions/2.6.2-parameter-expansion/recursive.sh.expected rename to tests/golden/good/2.6-word-expansions/2.6.2-parameter-expansion/recursive.t/expected.json diff --git a/tests/good/2.6-word-expansions/2.6.2-parameter-expansion/recursive.sh b/tests/golden/good/2.6-word-expansions/2.6.2-parameter-expansion/recursive.t/input.sh similarity index 100% rename from tests/good/2.6-word-expansions/2.6.2-parameter-expansion/recursive.sh rename to tests/golden/good/2.6-word-expansions/2.6.2-parameter-expansion/recursive.t/input.sh diff --git a/tests/good/2.6-word-expansions/2.6.2-parameter-expansion/vicious.sh.expected b/tests/golden/good/2.6-word-expansions/2.6.2-parameter-expansion/vicious.t/expected.json similarity index 100% rename from tests/good/2.6-word-expansions/2.6.2-parameter-expansion/vicious.sh.expected rename to tests/golden/good/2.6-word-expansions/2.6.2-parameter-expansion/vicious.t/expected.json diff --git a/tests/good/2.6-word-expansions/2.6.2-parameter-expansion/vicious.sh b/tests/golden/good/2.6-word-expansions/2.6.2-parameter-expansion/vicious.t/input.sh similarity index 100% rename from tests/good/2.6-word-expansions/2.6.2-parameter-expansion/vicious.sh rename to tests/golden/good/2.6-word-expansions/2.6.2-parameter-expansion/vicious.t/input.sh diff --git a/tests/good/2.6-word-expansions/2.6.2-parameter-expansion/with-spaces.sh.expected b/tests/golden/good/2.6-word-expansions/2.6.2-parameter-expansion/with-spaces.t/expected.json similarity index 100% rename from tests/good/2.6-word-expansions/2.6.2-parameter-expansion/with-spaces.sh.expected rename to tests/golden/good/2.6-word-expansions/2.6.2-parameter-expansion/with-spaces.t/expected.json diff --git a/tests/good/2.6-word-expansions/2.6.2-parameter-expansion/with-spaces.sh b/tests/golden/good/2.6-word-expansions/2.6.2-parameter-expansion/with-spaces.t/input.sh similarity index 100% rename from tests/good/2.6-word-expansions/2.6.2-parameter-expansion/with-spaces.sh rename to tests/golden/good/2.6-word-expansions/2.6.2-parameter-expansion/with-spaces.t/input.sh diff --git a/tests/good/2.6-word-expansions/2.6.2-parameter-expansion/word-following-variable-parameters.sh.expected b/tests/golden/good/2.6-word-expansions/2.6.2-parameter-expansion/word-following-variable-parameters.t/expected.json similarity index 100% rename from tests/good/2.6-word-expansions/2.6.2-parameter-expansion/word-following-variable-parameters.sh.expected rename to tests/golden/good/2.6-word-expansions/2.6.2-parameter-expansion/word-following-variable-parameters.t/expected.json diff --git a/tests/good/2.6-word-expansions/2.6.2-parameter-expansion/word-following-variable-parameters.sh b/tests/golden/good/2.6-word-expansions/2.6.2-parameter-expansion/word-following-variable-parameters.t/input.sh similarity index 100% rename from tests/good/2.6-word-expansions/2.6.2-parameter-expansion/word-following-variable-parameters.sh rename to tests/golden/good/2.6-word-expansions/2.6.2-parameter-expansion/word-following-variable-parameters.t/input.sh diff --git a/tests/good/2.6-word-expansions/2.6.3-command-substitutions/backslash-in-backquotes.sh.expected b/tests/golden/good/2.6-word-expansions/2.6.3-command-substitutions/backslash-in-backquotes.t/expected.json similarity index 100% rename from tests/good/2.6-word-expansions/2.6.3-command-substitutions/backslash-in-backquotes.sh.expected rename to tests/golden/good/2.6-word-expansions/2.6.3-command-substitutions/backslash-in-backquotes.t/expected.json diff --git a/tests/good/2.6-word-expansions/2.6.3-command-substitutions/backslash-in-backquotes.sh b/tests/golden/good/2.6-word-expansions/2.6.3-command-substitutions/backslash-in-backquotes.t/input.sh similarity index 100% rename from tests/good/2.6-word-expansions/2.6.3-command-substitutions/backslash-in-backquotes.sh rename to tests/golden/good/2.6-word-expansions/2.6.3-command-substitutions/backslash-in-backquotes.t/input.sh diff --git a/tests/good/2.6-word-expansions/2.6.3-command-substitutions/backslash-in-nested-subshells.sh.expected b/tests/golden/good/2.6-word-expansions/2.6.3-command-substitutions/backslash-in-nested-subshells.t/expected.json similarity index 100% rename from tests/good/2.6-word-expansions/2.6.3-command-substitutions/backslash-in-nested-subshells.sh.expected rename to tests/golden/good/2.6-word-expansions/2.6.3-command-substitutions/backslash-in-nested-subshells.t/expected.json diff --git a/tests/good/2.6-word-expansions/2.6.3-command-substitutions/backslash-in-nested-subshells.sh b/tests/golden/good/2.6-word-expansions/2.6.3-command-substitutions/backslash-in-nested-subshells.t/input.sh similarity index 100% rename from tests/good/2.6-word-expansions/2.6.3-command-substitutions/backslash-in-nested-subshells.sh rename to tests/golden/good/2.6-word-expansions/2.6.3-command-substitutions/backslash-in-nested-subshells.t/input.sh diff --git a/tests/good/2.6-word-expansions/2.6.3-command-substitutions/equality-in-subshell.sh.expected b/tests/golden/good/2.6-word-expansions/2.6.3-command-substitutions/equality-in-subshell.t/expected.json similarity index 100% rename from tests/good/2.6-word-expansions/2.6.3-command-substitutions/equality-in-subshell.sh.expected rename to tests/golden/good/2.6-word-expansions/2.6.3-command-substitutions/equality-in-subshell.t/expected.json diff --git a/tests/good/2.6-word-expansions/2.6.3-command-substitutions/equality-in-subshell.sh b/tests/golden/good/2.6-word-expansions/2.6.3-command-substitutions/equality-in-subshell.t/input.sh similarity index 100% rename from tests/good/2.6-word-expansions/2.6.3-command-substitutions/equality-in-subshell.sh rename to tests/golden/good/2.6-word-expansions/2.6.3-command-substitutions/equality-in-subshell.t/input.sh diff --git a/tests/good/2.7-redirection/2.7.1-redirecting-input/compound_cmd_redirect_input.sh.expected b/tests/golden/good/2.7-redirection/2.7.1-redirecting-input/compound-cmd-redirect-input.t/expected.json similarity index 100% rename from tests/good/2.7-redirection/2.7.1-redirecting-input/compound_cmd_redirect_input.sh.expected rename to tests/golden/good/2.7-redirection/2.7.1-redirecting-input/compound-cmd-redirect-input.t/expected.json diff --git a/tests/good/2.7-redirection/2.7.1-redirecting-input/compound_cmd_redirect_input.sh b/tests/golden/good/2.7-redirection/2.7.1-redirecting-input/compound-cmd-redirect-input.t/input.sh similarity index 100% rename from tests/good/2.7-redirection/2.7.1-redirecting-input/compound_cmd_redirect_input.sh rename to tests/golden/good/2.7-redirection/2.7.1-redirecting-input/compound-cmd-redirect-input.t/input.sh diff --git a/tests/good/2.7-redirection/2.7.1-redirecting-input/redirection_input.sh.expected b/tests/golden/good/2.7-redirection/2.7.1-redirecting-input/redirection-input.t/expected.json similarity index 100% rename from tests/good/2.7-redirection/2.7.1-redirecting-input/redirection_input.sh.expected rename to tests/golden/good/2.7-redirection/2.7.1-redirecting-input/redirection-input.t/expected.json diff --git a/tests/good/2.7-redirection/2.7.1-redirecting-input/redirection_input.sh b/tests/golden/good/2.7-redirection/2.7.1-redirecting-input/redirection-input.t/input.sh similarity index 100% rename from tests/good/2.7-redirection/2.7.1-redirecting-input/redirection_input.sh rename to tests/golden/good/2.7-redirection/2.7.1-redirecting-input/redirection-input.t/input.sh diff --git a/tests/good/2.7-redirection/2.7.2-redirecting-output/compound_cmd_redirect_output.sh.expected b/tests/golden/good/2.7-redirection/2.7.2-redirecting-output/compound-cmd-redirect-output.t/expected.json similarity index 100% rename from tests/good/2.7-redirection/2.7.2-redirecting-output/compound_cmd_redirect_output.sh.expected rename to tests/golden/good/2.7-redirection/2.7.2-redirecting-output/compound-cmd-redirect-output.t/expected.json diff --git a/tests/good/2.7-redirection/2.7.2-redirecting-output/compound_cmd_redirect_output.sh b/tests/golden/good/2.7-redirection/2.7.2-redirecting-output/compound-cmd-redirect-output.t/input.sh similarity index 100% rename from tests/good/2.7-redirection/2.7.2-redirecting-output/compound_cmd_redirect_output.sh rename to tests/golden/good/2.7-redirection/2.7.2-redirecting-output/compound-cmd-redirect-output.t/input.sh diff --git a/tests/good/2.7-redirection/2.7.2-redirecting-output/redirection_cand.sh.expected b/tests/golden/good/2.7-redirection/2.7.2-redirecting-output/redirection-cand.t/expected.json similarity index 100% rename from tests/good/2.7-redirection/2.7.2-redirecting-output/redirection_cand.sh.expected rename to tests/golden/good/2.7-redirection/2.7.2-redirecting-output/redirection-cand.t/expected.json diff --git a/tests/good/2.7-redirection/2.7.2-redirecting-output/redirection_cand.sh b/tests/golden/good/2.7-redirection/2.7.2-redirecting-output/redirection-cand.t/input.sh similarity index 100% rename from tests/good/2.7-redirection/2.7.2-redirecting-output/redirection_cand.sh rename to tests/golden/good/2.7-redirection/2.7.2-redirecting-output/redirection-cand.t/input.sh diff --git a/tests/good/2.7-redirection/2.7.2-redirecting-output/redirection_output.sh.expected b/tests/golden/good/2.7-redirection/2.7.2-redirecting-output/redirection-output.t/expected.json similarity index 100% rename from tests/good/2.7-redirection/2.7.2-redirecting-output/redirection_output.sh.expected rename to tests/golden/good/2.7-redirection/2.7.2-redirecting-output/redirection-output.t/expected.json diff --git a/tests/good/2.7-redirection/2.7.2-redirecting-output/redirection_output.sh b/tests/golden/good/2.7-redirection/2.7.2-redirecting-output/redirection-output.t/input.sh similarity index 100% rename from tests/good/2.7-redirection/2.7.2-redirecting-output/redirection_output.sh rename to tests/golden/good/2.7-redirection/2.7.2-redirecting-output/redirection-output.t/input.sh diff --git a/tests/good/2.7-redirection/2.7.3-appending-redirected-output/redirection_output-append.sh.expected b/tests/golden/good/2.7-redirection/2.7.3-appending-redirected-output/redirection-output-append.t/expected.json similarity index 100% rename from tests/good/2.7-redirection/2.7.3-appending-redirected-output/redirection_output-append.sh.expected rename to tests/golden/good/2.7-redirection/2.7.3-appending-redirected-output/redirection-output-append.t/expected.json diff --git a/tests/good/2.7-redirection/2.7.3-appending-redirected-output/redirection_output-append.sh b/tests/golden/good/2.7-redirection/2.7.3-appending-redirected-output/redirection-output-append.t/input.sh similarity index 100% rename from tests/good/2.7-redirection/2.7.3-appending-redirected-output/redirection_output-append.sh rename to tests/golden/good/2.7-redirection/2.7.3-appending-redirected-output/redirection-output-append.t/input.sh diff --git a/tests/good/2.7-redirection/2.7.4-here-document/backquote-in-quoted-here-document.sh.expected b/tests/golden/good/2.7-redirection/2.7.4-here-document/backquote-in-quoted-here-document.t/expected.json similarity index 100% rename from tests/good/2.7-redirection/2.7.4-here-document/backquote-in-quoted-here-document.sh.expected rename to tests/golden/good/2.7-redirection/2.7.4-here-document/backquote-in-quoted-here-document.t/expected.json diff --git a/tests/good/2.7-redirection/2.7.4-here-document/backquote-in-quoted-here-document.sh b/tests/golden/good/2.7-redirection/2.7.4-here-document/backquote-in-quoted-here-document.t/input.sh similarity index 100% rename from tests/good/2.7-redirection/2.7.4-here-document/backquote-in-quoted-here-document.sh rename to tests/golden/good/2.7-redirection/2.7.4-here-document/backquote-in-quoted-here-document.t/input.sh diff --git a/tests/good/2.7-redirection/2.7.4-here-document/backslash-in-here-document.sh.expected b/tests/golden/good/2.7-redirection/2.7.4-here-document/backslash-in-here-document.t/expected.json similarity index 100% rename from tests/good/2.7-redirection/2.7.4-here-document/backslash-in-here-document.sh.expected rename to tests/golden/good/2.7-redirection/2.7.4-here-document/backslash-in-here-document.t/expected.json diff --git a/tests/good/2.7-redirection/2.7.4-here-document/backslash-in-here-document.sh b/tests/golden/good/2.7-redirection/2.7.4-here-document/backslash-in-here-document.t/input.sh similarity index 100% rename from tests/good/2.7-redirection/2.7.4-here-document/backslash-in-here-document.sh rename to tests/golden/good/2.7-redirection/2.7.4-here-document/backslash-in-here-document.t/input.sh diff --git a/tests/good/2.7-redirection/2.7.4-here-document/compound-list-descriptor.sh.expected b/tests/golden/good/2.7-redirection/2.7.4-here-document/compound-list-descriptor.t/expected.json similarity index 100% rename from tests/good/2.7-redirection/2.7.4-here-document/compound-list-descriptor.sh.expected rename to tests/golden/good/2.7-redirection/2.7.4-here-document/compound-list-descriptor.t/expected.json diff --git a/tests/good/2.7-redirection/2.7.4-here-document/compound-list-descriptor.sh b/tests/golden/good/2.7-redirection/2.7.4-here-document/compound-list-descriptor.t/input.sh similarity index 100% rename from tests/good/2.7-redirection/2.7.4-here-document/compound-list-descriptor.sh rename to tests/golden/good/2.7-redirection/2.7.4-here-document/compound-list-descriptor.t/input.sh diff --git a/tests/good/2.7-redirection/2.7.4-here-document/continuation-line-in-here-document.sh.expected b/tests/golden/good/2.7-redirection/2.7.4-here-document/continuation-line-in-here-document.t/expected.json similarity index 100% rename from tests/good/2.7-redirection/2.7.4-here-document/continuation-line-in-here-document.sh.expected rename to tests/golden/good/2.7-redirection/2.7.4-here-document/continuation-line-in-here-document.t/expected.json diff --git a/tests/good/2.7-redirection/2.7.4-here-document/continuation-line-in-here-document.sh b/tests/golden/good/2.7-redirection/2.7.4-here-document/continuation-line-in-here-document.t/input.sh similarity index 100% rename from tests/good/2.7-redirection/2.7.4-here-document/continuation-line-in-here-document.sh rename to tests/golden/good/2.7-redirection/2.7.4-here-document/continuation-line-in-here-document.t/input.sh diff --git a/tests/good/2.7-redirection/2.7.4-here-document/delimiter-backslash-in-double-quotes-todrop.sh.expected b/tests/golden/good/2.7-redirection/2.7.4-here-document/delimiter-backslash-in-double-quotes-todrop.t/expected.json similarity index 100% rename from tests/good/2.7-redirection/2.7.4-here-document/delimiter-backslash-in-double-quotes-todrop.sh.expected rename to tests/golden/good/2.7-redirection/2.7.4-here-document/delimiter-backslash-in-double-quotes-todrop.t/expected.json diff --git a/tests/good/2.7-redirection/2.7.4-here-document/delimiter-backslash-in-double-quotes-todrop.sh b/tests/golden/good/2.7-redirection/2.7.4-here-document/delimiter-backslash-in-double-quotes-todrop.t/input.sh similarity index 100% rename from tests/good/2.7-redirection/2.7.4-here-document/delimiter-backslash-in-double-quotes-todrop.sh rename to tests/golden/good/2.7-redirection/2.7.4-here-document/delimiter-backslash-in-double-quotes-todrop.t/input.sh diff --git a/tests/good/2.7-redirection/2.7.4-here-document/delimiter-backslash-in-double-quotes-tokeep.sh.expected b/tests/golden/good/2.7-redirection/2.7.4-here-document/delimiter-backslash-in-double-quotes-tokeep.t/expected.json similarity index 100% rename from tests/good/2.7-redirection/2.7.4-here-document/delimiter-backslash-in-double-quotes-tokeep.sh.expected rename to tests/golden/good/2.7-redirection/2.7.4-here-document/delimiter-backslash-in-double-quotes-tokeep.t/expected.json diff --git a/tests/good/2.7-redirection/2.7.4-here-document/delimiter-backslash-in-double-quotes-tokeep.sh b/tests/golden/good/2.7-redirection/2.7.4-here-document/delimiter-backslash-in-double-quotes-tokeep.t/input.sh similarity index 100% rename from tests/good/2.7-redirection/2.7.4-here-document/delimiter-backslash-in-double-quotes-tokeep.sh rename to tests/golden/good/2.7-redirection/2.7.4-here-document/delimiter-backslash-in-double-quotes-tokeep.t/input.sh diff --git a/tests/good/2.7-redirection/2.7.4-here-document/delimiter-is-bang.sh.expected b/tests/golden/good/2.7-redirection/2.7.4-here-document/delimiter-is-bang.t/expected.json similarity index 100% rename from tests/good/2.7-redirection/2.7.4-here-document/delimiter-is-bang.sh.expected rename to tests/golden/good/2.7-redirection/2.7.4-here-document/delimiter-is-bang.t/expected.json diff --git a/tests/good/2.7-redirection/2.7.4-here-document/delimiter-is-bang.sh b/tests/golden/good/2.7-redirection/2.7.4-here-document/delimiter-is-bang.t/input.sh similarity index 100% rename from tests/good/2.7-redirection/2.7.4-here-document/delimiter-is-bang.sh rename to tests/golden/good/2.7-redirection/2.7.4-here-document/delimiter-is-bang.t/input.sh diff --git a/tests/good/2.7-redirection/2.7.4-here-document/delimiter-with-spaces.sh.expected b/tests/golden/good/2.7-redirection/2.7.4-here-document/delimiter-with-spaces.t/expected.json similarity index 100% rename from tests/good/2.7-redirection/2.7.4-here-document/delimiter-with-spaces.sh.expected rename to tests/golden/good/2.7-redirection/2.7.4-here-document/delimiter-with-spaces.t/expected.json diff --git a/tests/good/2.7-redirection/2.7.4-here-document/delimiter-with-spaces.sh b/tests/golden/good/2.7-redirection/2.7.4-here-document/delimiter-with-spaces.t/input.sh similarity index 100% rename from tests/good/2.7-redirection/2.7.4-here-document/delimiter-with-spaces.sh rename to tests/golden/good/2.7-redirection/2.7.4-here-document/delimiter-with-spaces.t/input.sh diff --git a/tests/good/2.7-redirection/2.7.4-here-document/delimiter-with-variable.sh.expected b/tests/golden/good/2.7-redirection/2.7.4-here-document/delimiter-with-variable.t/expected.json similarity index 100% rename from tests/good/2.7-redirection/2.7.4-here-document/delimiter-with-variable.sh.expected rename to tests/golden/good/2.7-redirection/2.7.4-here-document/delimiter-with-variable.t/expected.json diff --git a/tests/good/2.7-redirection/2.7.4-here-document/delimiter-with-variable.sh b/tests/golden/good/2.7-redirection/2.7.4-here-document/delimiter-with-variable.t/input.sh similarity index 100% rename from tests/good/2.7-redirection/2.7.4-here-document/delimiter-with-variable.sh rename to tests/golden/good/2.7-redirection/2.7.4-here-document/delimiter-with-variable.t/input.sh diff --git a/tests/good/2.7-redirection/2.7.4-here-document/dont-expand-backslash-when-quoted-delimiter-subshell.sh.expected b/tests/golden/good/2.7-redirection/2.7.4-here-document/dont-expand-backslash-when-quoted-delimiter-subshell.t/expected.json similarity index 100% rename from tests/good/2.7-redirection/2.7.4-here-document/dont-expand-backslash-when-quoted-delimiter-subshell.sh.expected rename to tests/golden/good/2.7-redirection/2.7.4-here-document/dont-expand-backslash-when-quoted-delimiter-subshell.t/expected.json diff --git a/tests/good/2.7-redirection/2.7.4-here-document/dont-expand-backslash-when-quoted-delimiter-subshell.sh b/tests/golden/good/2.7-redirection/2.7.4-here-document/dont-expand-backslash-when-quoted-delimiter-subshell.t/input.sh similarity index 100% rename from tests/good/2.7-redirection/2.7.4-here-document/dont-expand-backslash-when-quoted-delimiter-subshell.sh rename to tests/golden/good/2.7-redirection/2.7.4-here-document/dont-expand-backslash-when-quoted-delimiter-subshell.t/input.sh diff --git a/tests/good/2.7-redirection/2.7.4-here-document/dont-expand-backslash-when-quoted-delimiter.sh.expected b/tests/golden/good/2.7-redirection/2.7.4-here-document/dont-expand-backslash-when-quoted-delimiter.t/expected.json similarity index 100% rename from tests/good/2.7-redirection/2.7.4-here-document/dont-expand-backslash-when-quoted-delimiter.sh.expected rename to tests/golden/good/2.7-redirection/2.7.4-here-document/dont-expand-backslash-when-quoted-delimiter.t/expected.json diff --git a/tests/good/2.7-redirection/2.7.4-here-document/dont-expand-backslash-when-quoted-delimiter.sh b/tests/golden/good/2.7-redirection/2.7.4-here-document/dont-expand-backslash-when-quoted-delimiter.t/input.sh similarity index 100% rename from tests/good/2.7-redirection/2.7.4-here-document/dont-expand-backslash-when-quoted-delimiter.sh rename to tests/golden/good/2.7-redirection/2.7.4-here-document/dont-expand-backslash-when-quoted-delimiter.t/input.sh diff --git a/tests/good/2.7-redirection/2.7.4-here-document/empty.sh.expected b/tests/golden/good/2.7-redirection/2.7.4-here-document/empty.t/expected.json similarity index 100% rename from tests/good/2.7-redirection/2.7.4-here-document/empty.sh.expected rename to tests/golden/good/2.7-redirection/2.7.4-here-document/empty.t/expected.json diff --git a/tests/good/2.7-redirection/2.7.4-here-document/empty.sh b/tests/golden/good/2.7-redirection/2.7.4-here-document/empty.t/input.sh similarity index 100% rename from tests/good/2.7-redirection/2.7.4-here-document/empty.sh rename to tests/golden/good/2.7-redirection/2.7.4-here-document/empty.t/input.sh diff --git a/tests/good/2.7-redirection/2.7.4-here-document/for_loop_here_document.sh.expected b/tests/golden/good/2.7-redirection/2.7.4-here-document/for-loop-here-document.t/expected.json similarity index 100% rename from tests/good/2.7-redirection/2.7.4-here-document/for_loop_here_document.sh.expected rename to tests/golden/good/2.7-redirection/2.7.4-here-document/for-loop-here-document.t/expected.json diff --git a/tests/good/2.7-redirection/2.7.4-here-document/for_loop_here_document.sh b/tests/golden/good/2.7-redirection/2.7.4-here-document/for-loop-here-document.t/input.sh similarity index 100% rename from tests/good/2.7-redirection/2.7.4-here-document/for_loop_here_document.sh rename to tests/golden/good/2.7-redirection/2.7.4-here-document/for-loop-here-document.t/input.sh diff --git a/tests/good/2.7-redirection/2.7.4-here-document/here-operator-in-here-document.expected b/tests/golden/good/2.7-redirection/2.7.4-here-document/here-operator-in-here-document.t/expected.json similarity index 100% rename from tests/good/2.7-redirection/2.7.4-here-document/here-operator-in-here-document.expected rename to tests/golden/good/2.7-redirection/2.7.4-here-document/here-operator-in-here-document.t/expected.json diff --git a/tests/good/2.7-redirection/2.7.4-here-document/here-operator-in-here-document b/tests/golden/good/2.7-redirection/2.7.4-here-document/here-operator-in-here-document.t/input.sh similarity index 100% rename from tests/good/2.7-redirection/2.7.4-here-document/here-operator-in-here-document rename to tests/golden/good/2.7-redirection/2.7.4-here-document/here-operator-in-here-document.t/input.sh diff --git a/tests/good/2.7-redirection/2.7.4-here-document/multiple.sh.expected b/tests/golden/good/2.7-redirection/2.7.4-here-document/multiple.t/expected.json similarity index 100% rename from tests/good/2.7-redirection/2.7.4-here-document/multiple.sh.expected rename to tests/golden/good/2.7-redirection/2.7.4-here-document/multiple.t/expected.json diff --git a/tests/good/2.7-redirection/2.7.4-here-document/multiple.sh b/tests/golden/good/2.7-redirection/2.7.4-here-document/multiple.t/input.sh similarity index 100% rename from tests/good/2.7-redirection/2.7.4-here-document/multiple.sh rename to tests/golden/good/2.7-redirection/2.7.4-here-document/multiple.t/input.sh diff --git a/tests/good/2.7-redirection/2.7.4-here-document/quote-in-here-document.sh.expected b/tests/golden/good/2.7-redirection/2.7.4-here-document/quote-in-here-document.t/expected.json similarity index 100% rename from tests/good/2.7-redirection/2.7.4-here-document/quote-in-here-document.sh.expected rename to tests/golden/good/2.7-redirection/2.7.4-here-document/quote-in-here-document.t/expected.json diff --git a/tests/good/2.7-redirection/2.7.4-here-document/quote-in-here-document.sh b/tests/golden/good/2.7-redirection/2.7.4-here-document/quote-in-here-document.t/input.sh similarity index 100% rename from tests/good/2.7-redirection/2.7.4-here-document/quote-in-here-document.sh rename to tests/golden/good/2.7-redirection/2.7.4-here-document/quote-in-here-document.t/input.sh diff --git a/tests/good/2.7-redirection/2.7.4-here-document/quoted-delimiter-no-expansion-inside-command-substitution.sh.expected b/tests/golden/good/2.7-redirection/2.7.4-here-document/quoted-delimiter-no-expansion-inside-command-substitution.t/expected.json similarity index 100% rename from tests/good/2.7-redirection/2.7.4-here-document/quoted-delimiter-no-expansion-inside-command-substitution.sh.expected rename to tests/golden/good/2.7-redirection/2.7.4-here-document/quoted-delimiter-no-expansion-inside-command-substitution.t/expected.json diff --git a/tests/good/2.7-redirection/2.7.4-here-document/quoted-delimiter-no-expansion.sh.expected b/tests/golden/good/2.7-redirection/2.7.4-here-document/quoted-delimiter-no-expansion.t/expected.json similarity index 100% rename from tests/good/2.7-redirection/2.7.4-here-document/quoted-delimiter-no-expansion.sh.expected rename to tests/golden/good/2.7-redirection/2.7.4-here-document/quoted-delimiter-no-expansion.t/expected.json diff --git a/tests/good/2.7-redirection/2.7.4-here-document/quoted-delimiter-no-expansion.sh b/tests/golden/good/2.7-redirection/2.7.4-here-document/quoted-delimiter-no-expansion.t/input.sh similarity index 100% rename from tests/good/2.7-redirection/2.7.4-here-document/quoted-delimiter-no-expansion.sh rename to tests/golden/good/2.7-redirection/2.7.4-here-document/quoted-delimiter-no-expansion.t/input.sh diff --git a/tests/good/2.7-redirection/2.7.4-here-document/quoted-delimiter.sh.expected b/tests/golden/good/2.7-redirection/2.7.4-here-document/quoted-delimiter.t/expected.json similarity index 100% rename from tests/good/2.7-redirection/2.7.4-here-document/quoted-delimiter.sh.expected rename to tests/golden/good/2.7-redirection/2.7.4-here-document/quoted-delimiter.t/expected.json diff --git a/tests/good/2.7-redirection/2.7.4-here-document/quoted-delimiter.sh b/tests/golden/good/2.7-redirection/2.7.4-here-document/quoted-delimiter.t/input.sh similarity index 100% rename from tests/good/2.7-redirection/2.7.4-here-document/quoted-delimiter.sh rename to tests/golden/good/2.7-redirection/2.7.4-here-document/quoted-delimiter.t/input.sh diff --git a/tests/good/2.7-redirection/2.7.4-here-document/redirected-to-backquote-expansion.sh.expected b/tests/golden/good/2.7-redirection/2.7.4-here-document/redirected-to-backquote-expansion.t/expected.json similarity index 100% rename from tests/good/2.7-redirection/2.7.4-here-document/redirected-to-backquote-expansion.sh.expected rename to tests/golden/good/2.7-redirection/2.7.4-here-document/redirected-to-backquote-expansion.t/expected.json diff --git a/tests/good/2.7-redirection/2.7.4-here-document/redirected-to-backquote-expansion.sh b/tests/golden/good/2.7-redirection/2.7.4-here-document/redirected-to-backquote-expansion.t/input.sh similarity index 100% rename from tests/good/2.7-redirection/2.7.4-here-document/redirected-to-backquote-expansion.sh rename to tests/golden/good/2.7-redirection/2.7.4-here-document/redirected-to-backquote-expansion.t/input.sh diff --git a/tests/good/2.7-redirection/2.7.4-here-document/redirection_and_here_quoted_delimiter.sh.expected b/tests/golden/good/2.7-redirection/2.7.4-here-document/redirection-and-here-quoted-delimiter.t/expected.json similarity index 100% rename from tests/good/2.7-redirection/2.7.4-here-document/redirection_and_here_quoted_delimiter.sh.expected rename to tests/golden/good/2.7-redirection/2.7.4-here-document/redirection-and-here-quoted-delimiter.t/expected.json diff --git a/tests/good/2.7-redirection/2.7.4-here-document/redirection_and_here_quoted_delimiter.sh b/tests/golden/good/2.7-redirection/2.7.4-here-document/redirection-and-here-quoted-delimiter.t/input.sh similarity index 100% rename from tests/good/2.7-redirection/2.7.4-here-document/redirection_and_here_quoted_delimiter.sh rename to tests/golden/good/2.7-redirection/2.7.4-here-document/redirection-and-here-quoted-delimiter.t/input.sh diff --git a/tests/good/2.7-redirection/2.7.4-here-document/redirection_and_here_unquoted_delimiter.sh.expected b/tests/golden/good/2.7-redirection/2.7.4-here-document/redirection-and-here-unquoted-delimiter.t/expected.json similarity index 100% rename from tests/good/2.7-redirection/2.7.4-here-document/redirection_and_here_unquoted_delimiter.sh.expected rename to tests/golden/good/2.7-redirection/2.7.4-here-document/redirection-and-here-unquoted-delimiter.t/expected.json diff --git a/tests/good/2.7-redirection/2.7.4-here-document/redirection_and_here_unquoted_delimiter.sh b/tests/golden/good/2.7-redirection/2.7.4-here-document/redirection-and-here-unquoted-delimiter.t/input.sh similarity index 100% rename from tests/good/2.7-redirection/2.7.4-here-document/redirection_and_here_unquoted_delimiter.sh rename to tests/golden/good/2.7-redirection/2.7.4-here-document/redirection-and-here-unquoted-delimiter.t/input.sh diff --git a/tests/good/2.7-redirection/2.7.4-here-document/subshell_here_document.sh.expected b/tests/golden/good/2.7-redirection/2.7.4-here-document/subshell-here-document.t/expected.json similarity index 100% rename from tests/good/2.7-redirection/2.7.4-here-document/subshell_here_document.sh.expected rename to tests/golden/good/2.7-redirection/2.7.4-here-document/subshell-here-document.t/expected.json diff --git a/tests/good/2.7-redirection/2.7.4-here-document/subshell_here_document.sh b/tests/golden/good/2.7-redirection/2.7.4-here-document/subshell-here-document.t/input.sh similarity index 100% rename from tests/good/2.7-redirection/2.7.4-here-document/subshell_here_document.sh rename to tests/golden/good/2.7-redirection/2.7.4-here-document/subshell-here-document.t/input.sh diff --git a/tests/good/2.7-redirection/2.7.4-here-document/tabs.sh.expected b/tests/golden/good/2.7-redirection/2.7.4-here-document/tabs.t/expected.json similarity index 100% rename from tests/good/2.7-redirection/2.7.4-here-document/tabs.sh.expected rename to tests/golden/good/2.7-redirection/2.7.4-here-document/tabs.t/expected.json diff --git a/tests/good/2.7-redirection/2.7.4-here-document/tabs.sh b/tests/golden/good/2.7-redirection/2.7.4-here-document/tabs.t/input.sh similarity index 100% rename from tests/good/2.7-redirection/2.7.4-here-document/tabs.sh rename to tests/golden/good/2.7-redirection/2.7.4-here-document/tabs.t/input.sh diff --git a/tests/good/2.7-redirection/2.7.5_duplicating-an-input-file-descriptor/redirection_input_duplication.sh.expected b/tests/golden/good/2.7-redirection/2.7.5-duplicating-an-input-file-descriptor/redirection-input-duplication.t/expected.json similarity index 100% rename from tests/good/2.7-redirection/2.7.5_duplicating-an-input-file-descriptor/redirection_input_duplication.sh.expected rename to tests/golden/good/2.7-redirection/2.7.5-duplicating-an-input-file-descriptor/redirection-input-duplication.t/expected.json diff --git a/tests/good/2.7-redirection/2.7.5_duplicating-an-input-file-descriptor/redirection_input_duplication.sh b/tests/golden/good/2.7-redirection/2.7.5-duplicating-an-input-file-descriptor/redirection-input-duplication.t/input.sh similarity index 100% rename from tests/good/2.7-redirection/2.7.5_duplicating-an-input-file-descriptor/redirection_input_duplication.sh rename to tests/golden/good/2.7-redirection/2.7.5-duplicating-an-input-file-descriptor/redirection-input-duplication.t/input.sh diff --git a/tests/good/2.7-redirection/2.7.6_duplicating-an-output-file-descriptor/redirection_output_duplication.sh.expected b/tests/golden/good/2.7-redirection/2.7.6-duplicating-an-output-file-descriptor/redirection-output-duplication.t/expected.json similarity index 100% rename from tests/good/2.7-redirection/2.7.6_duplicating-an-output-file-descriptor/redirection_output_duplication.sh.expected rename to tests/golden/good/2.7-redirection/2.7.6-duplicating-an-output-file-descriptor/redirection-output-duplication.t/expected.json diff --git a/tests/good/2.7-redirection/2.7.6_duplicating-an-output-file-descriptor/redirection_output_duplication.sh b/tests/golden/good/2.7-redirection/2.7.6-duplicating-an-output-file-descriptor/redirection-output-duplication.t/input.sh similarity index 100% rename from tests/good/2.7-redirection/2.7.6_duplicating-an-output-file-descriptor/redirection_output_duplication.sh rename to tests/golden/good/2.7-redirection/2.7.6-duplicating-an-output-file-descriptor/redirection-output-duplication.t/input.sh diff --git a/tests/good/2.7-redirection/2.7.7_open-file-descriptors-for-reading-and-writing/redirection_input_output.sh.expected b/tests/golden/good/2.7-redirection/2.7.7-open-file-descriptors-for-reading-and-writing/redirection-input-output.t/expected.json similarity index 100% rename from tests/good/2.7-redirection/2.7.7_open-file-descriptors-for-reading-and-writing/redirection_input_output.sh.expected rename to tests/golden/good/2.7-redirection/2.7.7-open-file-descriptors-for-reading-and-writing/redirection-input-output.t/expected.json diff --git a/tests/good/2.7-redirection/2.7.7_open-file-descriptors-for-reading-and-writing/redirection_input_output.sh b/tests/golden/good/2.7-redirection/2.7.7-open-file-descriptors-for-reading-and-writing/redirection-input-output.t/input.sh similarity index 100% rename from tests/good/2.7-redirection/2.7.7_open-file-descriptors-for-reading-and-writing/redirection_input_output.sh rename to tests/golden/good/2.7-redirection/2.7.7-open-file-descriptors-for-reading-and-writing/redirection-input-output.t/input.sh diff --git a/tests/good/2.7-redirection/quoted-number.sh.expected b/tests/golden/good/2.7-redirection/quoted-number.t/expected.json similarity index 100% rename from tests/good/2.7-redirection/quoted-number.sh.expected rename to tests/golden/good/2.7-redirection/quoted-number.t/expected.json diff --git a/tests/good/2.7-redirection/quoted-number.sh b/tests/golden/good/2.7-redirection/quoted-number.t/input.sh similarity index 100% rename from tests/good/2.7-redirection/quoted-number.sh rename to tests/golden/good/2.7-redirection/quoted-number.t/input.sh diff --git a/tests/good/2.7-redirection/quoted-op.sh.expected b/tests/golden/good/2.7-redirection/quoted-op.t/expected.json similarity index 100% rename from tests/good/2.7-redirection/quoted-op.sh.expected rename to tests/golden/good/2.7-redirection/quoted-op.t/expected.json diff --git a/tests/good/2.7-redirection/quoted-op.sh b/tests/golden/good/2.7-redirection/quoted-op.t/input.sh similarity index 100% rename from tests/good/2.7-redirection/quoted-op.sh rename to tests/golden/good/2.7-redirection/quoted-op.t/input.sh diff --git a/tests/good/2.8-exit-status-and-errors/README b/tests/golden/good/2.8-exit-status-and-errors/README.md similarity index 100% rename from tests/good/2.8-exit-status-and-errors/README rename to tests/golden/good/2.8-exit-status-and-errors/README.md diff --git a/tests/good/2.9-shell_commands/2.9.1_simple-commands/assignment-words.sh.expected b/tests/golden/good/2.9-shell-commands/2.9.1-simple-commands/assignment-words.t/expected.json similarity index 100% rename from tests/good/2.9-shell_commands/2.9.1_simple-commands/assignment-words.sh.expected rename to tests/golden/good/2.9-shell-commands/2.9.1-simple-commands/assignment-words.t/expected.json diff --git a/tests/good/2.9-shell_commands/2.9.1_simple-commands/assignment-words.sh b/tests/golden/good/2.9-shell-commands/2.9.1-simple-commands/assignment-words.t/input.sh similarity index 100% rename from tests/good/2.9-shell_commands/2.9.1_simple-commands/assignment-words.sh rename to tests/golden/good/2.9-shell-commands/2.9.1-simple-commands/assignment-words.t/input.sh diff --git a/tests/good/2.9-shell_commands/2.9.2_pipelines/pipelines.sh.expected b/tests/golden/good/2.9-shell-commands/2.9.2-pipelines/pipelines.t/expected.json similarity index 100% rename from tests/good/2.9-shell_commands/2.9.2_pipelines/pipelines.sh.expected rename to tests/golden/good/2.9-shell-commands/2.9.2-pipelines/pipelines.t/expected.json diff --git a/tests/good/2.9-shell_commands/2.9.2_pipelines/pipelines.sh b/tests/golden/good/2.9-shell-commands/2.9.2-pipelines/pipelines.t/input.sh similarity index 100% rename from tests/good/2.9-shell_commands/2.9.2_pipelines/pipelines.sh rename to tests/golden/good/2.9-shell-commands/2.9.2-pipelines/pipelines.t/input.sh diff --git a/tests/good/2.9-shell_commands/2.9.4_compound_commands/case/assignment_in_case.sh.expected b/tests/golden/good/2.9-shell-commands/2.9.4-compound-commands/case/assignment-in-case.t/expected.json similarity index 100% rename from tests/good/2.9-shell_commands/2.9.4_compound_commands/case/assignment_in_case.sh.expected rename to tests/golden/good/2.9-shell-commands/2.9.4-compound-commands/case/assignment-in-case.t/expected.json diff --git a/tests/good/2.9-shell_commands/2.9.4_compound_commands/case/assignment_in_case.sh b/tests/golden/good/2.9-shell-commands/2.9.4-compound-commands/case/assignment-in-case.t/input.sh old mode 100755 new mode 100644 similarity index 100% rename from tests/good/2.9-shell_commands/2.9.4_compound_commands/case/assignment_in_case.sh rename to tests/golden/good/2.9-shell-commands/2.9.4-compound-commands/case/assignment-in-case.t/input.sh diff --git a/tests/good/2.9-shell_commands/2.9.4_compound_commands/case/case.sh.expected b/tests/golden/good/2.9-shell-commands/2.9.4-compound-commands/case/case.t/expected.json similarity index 100% rename from tests/good/2.9-shell_commands/2.9.4_compound_commands/case/case.sh.expected rename to tests/golden/good/2.9-shell-commands/2.9.4-compound-commands/case/case.t/expected.json diff --git a/tests/good/2.9-shell_commands/2.9.4_compound_commands/case/case.sh b/tests/golden/good/2.9-shell-commands/2.9.4-compound-commands/case/case.t/input.sh similarity index 100% rename from tests/good/2.9-shell_commands/2.9.4_compound_commands/case/case.sh rename to tests/golden/good/2.9-shell-commands/2.9.4-compound-commands/case/case.t/input.sh diff --git a/tests/good/2.9-shell_commands/2.9.4_compound_commands/case/dollarsharp_in_case.sh.expected b/tests/golden/good/2.9-shell-commands/2.9.4-compound-commands/case/dollarsharp-in-case.t/expected.json similarity index 100% rename from tests/good/2.9-shell_commands/2.9.4_compound_commands/case/dollarsharp_in_case.sh.expected rename to tests/golden/good/2.9-shell-commands/2.9.4-compound-commands/case/dollarsharp-in-case.t/expected.json diff --git a/tests/good/2.9-shell_commands/2.9.4_compound_commands/case/dollarsharp_in_case.sh b/tests/golden/good/2.9-shell-commands/2.9.4-compound-commands/case/dollarsharp-in-case.t/input.sh similarity index 100% rename from tests/good/2.9-shell_commands/2.9.4_compound_commands/case/dollarsharp_in_case.sh rename to tests/golden/good/2.9-shell-commands/2.9.4-compound-commands/case/dollarsharp-in-case.t/input.sh diff --git a/tests/good/2.9-shell_commands/2.9.4_compound_commands/for/for_assignment_in_wordlist.sh.expected b/tests/golden/good/2.9-shell-commands/2.9.4-compound-commands/for/for-assignment-in-wordlist.t/expected.json similarity index 100% rename from tests/good/2.9-shell_commands/2.9.4_compound_commands/for/for_assignment_in_wordlist.sh.expected rename to tests/golden/good/2.9-shell-commands/2.9.4-compound-commands/for/for-assignment-in-wordlist.t/expected.json diff --git a/tests/good/2.9-shell_commands/2.9.4_compound_commands/for/for_assignment_in_wordlist.sh b/tests/golden/good/2.9-shell-commands/2.9.4-compound-commands/for/for-assignment-in-wordlist.t/input.sh similarity index 100% rename from tests/good/2.9-shell_commands/2.9.4_compound_commands/for/for_assignment_in_wordlist.sh rename to tests/golden/good/2.9-shell-commands/2.9.4-compound-commands/for/for-assignment-in-wordlist.t/input.sh diff --git a/tests/good/2.9-shell_commands/2.9.4_compound_commands/for/for.sh.expected b/tests/golden/good/2.9-shell-commands/2.9.4-compound-commands/for/for-without-in-lines.t/expected.json similarity index 100% rename from tests/good/2.9-shell_commands/2.9.4_compound_commands/for/for.sh.expected rename to tests/golden/good/2.9-shell-commands/2.9.4-compound-commands/for/for-without-in-lines.t/expected.json diff --git a/tests/good/2.9-shell_commands/2.9.4_compound_commands/for/for_without_in_lines.sh b/tests/golden/good/2.9-shell-commands/2.9.4-compound-commands/for/for-without-in-lines.t/input.sh similarity index 100% rename from tests/good/2.9-shell_commands/2.9.4_compound_commands/for/for_without_in_lines.sh rename to tests/golden/good/2.9-shell-commands/2.9.4-compound-commands/for/for-without-in-lines.t/input.sh diff --git a/tests/good/2.9-shell_commands/2.9.4_compound_commands/for/for_without_in_oneline.sh.expected b/tests/golden/good/2.9-shell-commands/2.9.4-compound-commands/for/for-without-in-oneline.t/expected.json similarity index 100% rename from tests/good/2.9-shell_commands/2.9.4_compound_commands/for/for_without_in_oneline.sh.expected rename to tests/golden/good/2.9-shell-commands/2.9.4-compound-commands/for/for-without-in-oneline.t/expected.json diff --git a/tests/good/2.9-shell_commands/2.9.4_compound_commands/for/for_without_in_oneline.sh b/tests/golden/good/2.9-shell-commands/2.9.4-compound-commands/for/for-without-in-oneline.t/input.sh similarity index 100% rename from tests/good/2.9-shell_commands/2.9.4_compound_commands/for/for_without_in_oneline.sh rename to tests/golden/good/2.9-shell-commands/2.9.4-compound-commands/for/for-without-in-oneline.t/input.sh diff --git a/tests/good/2.9-shell_commands/2.9.4_compound_commands/for/for_without_in_lines.sh.expected b/tests/golden/good/2.9-shell-commands/2.9.4-compound-commands/for/for.t/expected.json similarity index 100% rename from tests/good/2.9-shell_commands/2.9.4_compound_commands/for/for_without_in_lines.sh.expected rename to tests/golden/good/2.9-shell-commands/2.9.4-compound-commands/for/for.t/expected.json diff --git a/tests/good/2.9-shell_commands/2.9.4_compound_commands/for/for.sh b/tests/golden/good/2.9-shell-commands/2.9.4-compound-commands/for/for.t/input.sh similarity index 100% rename from tests/good/2.9-shell_commands/2.9.4_compound_commands/for/for.sh rename to tests/golden/good/2.9-shell-commands/2.9.4-compound-commands/for/for.t/input.sh diff --git a/tests/good/2.9-shell_commands/2.9.4_compound_commands/for/for1.sh.expected b/tests/golden/good/2.9-shell-commands/2.9.4-compound-commands/for/for1.t/expected.json similarity index 100% rename from tests/good/2.9-shell_commands/2.9.4_compound_commands/for/for1.sh.expected rename to tests/golden/good/2.9-shell-commands/2.9.4-compound-commands/for/for1.t/expected.json diff --git a/tests/good/2.9-shell_commands/2.9.4_compound_commands/for/for1.sh b/tests/golden/good/2.9-shell-commands/2.9.4-compound-commands/for/for1.t/input.sh similarity index 100% rename from tests/good/2.9-shell_commands/2.9.4_compound_commands/for/for1.sh rename to tests/golden/good/2.9-shell-commands/2.9.4-compound-commands/for/for1.t/input.sh diff --git a/tests/good/2.9-shell_commands/2.9.4_compound_commands/for/for2.sh.expected b/tests/golden/good/2.9-shell-commands/2.9.4-compound-commands/for/for2.t/expected.json similarity index 100% rename from tests/good/2.9-shell_commands/2.9.4_compound_commands/for/for2.sh.expected rename to tests/golden/good/2.9-shell-commands/2.9.4-compound-commands/for/for2.t/expected.json diff --git a/tests/good/2.9-shell_commands/2.9.4_compound_commands/for/for2.sh b/tests/golden/good/2.9-shell-commands/2.9.4-compound-commands/for/for2.t/input.sh similarity index 100% rename from tests/good/2.9-shell_commands/2.9.4_compound_commands/for/for2.sh rename to tests/golden/good/2.9-shell-commands/2.9.4-compound-commands/for/for2.t/input.sh diff --git a/tests/good/2.9-shell_commands/2.9.4_compound_commands/for/for3.sh.expected b/tests/golden/good/2.9-shell-commands/2.9.4-compound-commands/for/for3.t/expected.json similarity index 100% rename from tests/good/2.9-shell_commands/2.9.4_compound_commands/for/for3.sh.expected rename to tests/golden/good/2.9-shell-commands/2.9.4-compound-commands/for/for3.t/expected.json diff --git a/tests/good/2.9-shell_commands/2.9.4_compound_commands/for/for3.sh b/tests/golden/good/2.9-shell-commands/2.9.4-compound-commands/for/for3.t/input.sh similarity index 100% rename from tests/good/2.9-shell_commands/2.9.4_compound_commands/for/for3.sh rename to tests/golden/good/2.9-shell-commands/2.9.4-compound-commands/for/for3.t/input.sh diff --git a/tests/good/2.9-shell_commands/2.9.4_compound_commands/for/for4.sh.expected b/tests/golden/good/2.9-shell-commands/2.9.4-compound-commands/for/for4.t/expected.json similarity index 100% rename from tests/good/2.9-shell_commands/2.9.4_compound_commands/for/for4.sh.expected rename to tests/golden/good/2.9-shell-commands/2.9.4-compound-commands/for/for4.t/expected.json diff --git a/tests/good/2.9-shell_commands/2.9.4_compound_commands/for/for4.sh b/tests/golden/good/2.9-shell-commands/2.9.4-compound-commands/for/for4.t/input.sh similarity index 100% rename from tests/good/2.9-shell_commands/2.9.4_compound_commands/for/for4.sh rename to tests/golden/good/2.9-shell-commands/2.9.4-compound-commands/for/for4.t/input.sh diff --git a/tests/good/2.9-shell_commands/2.9.4_compound_commands/grouping/grouping_bracegroup.sh.expected b/tests/golden/good/2.9-shell-commands/2.9.4-compound-commands/grouping/grouping-bracegroup.t/expected.json similarity index 100% rename from tests/good/2.9-shell_commands/2.9.4_compound_commands/grouping/grouping_bracegroup.sh.expected rename to tests/golden/good/2.9-shell-commands/2.9.4-compound-commands/grouping/grouping-bracegroup.t/expected.json diff --git a/tests/good/2.9-shell_commands/2.9.4_compound_commands/grouping/grouping_bracegroup.sh b/tests/golden/good/2.9-shell-commands/2.9.4-compound-commands/grouping/grouping-bracegroup.t/input.sh similarity index 100% rename from tests/good/2.9-shell_commands/2.9.4_compound_commands/grouping/grouping_bracegroup.sh rename to tests/golden/good/2.9-shell-commands/2.9.4-compound-commands/grouping/grouping-bracegroup.t/input.sh diff --git a/tests/good/2.9-shell_commands/2.9.4_compound_commands/grouping/grouping_parentheses.sh.expected b/tests/golden/good/2.9-shell-commands/2.9.4-compound-commands/grouping/grouping-parentheses.t/expected.json similarity index 100% rename from tests/good/2.9-shell_commands/2.9.4_compound_commands/grouping/grouping_parentheses.sh.expected rename to tests/golden/good/2.9-shell-commands/2.9.4-compound-commands/grouping/grouping-parentheses.t/expected.json diff --git a/tests/good/2.9-shell_commands/2.9.4_compound_commands/grouping/grouping_parentheses.sh b/tests/golden/good/2.9-shell-commands/2.9.4-compound-commands/grouping/grouping-parentheses.t/input.sh similarity index 100% rename from tests/good/2.9-shell_commands/2.9.4_compound_commands/grouping/grouping_parentheses.sh rename to tests/golden/good/2.9-shell-commands/2.9.4-compound-commands/grouping/grouping-parentheses.t/input.sh diff --git a/tests/good/2.9-shell_commands/2.9.4_compound_commands/grouping/grouping_parentheses2.sh.expected b/tests/golden/good/2.9-shell-commands/2.9.4-compound-commands/grouping/grouping-parentheses2.t/expected.json similarity index 100% rename from tests/good/2.9-shell_commands/2.9.4_compound_commands/grouping/grouping_parentheses2.sh.expected rename to tests/golden/good/2.9-shell-commands/2.9.4-compound-commands/grouping/grouping-parentheses2.t/expected.json diff --git a/tests/good/2.9-shell_commands/2.9.4_compound_commands/grouping/grouping_parentheses2.sh b/tests/golden/good/2.9-shell-commands/2.9.4-compound-commands/grouping/grouping-parentheses2.t/input.sh similarity index 100% rename from tests/good/2.9-shell_commands/2.9.4_compound_commands/grouping/grouping_parentheses2.sh rename to tests/golden/good/2.9-shell-commands/2.9.4-compound-commands/grouping/grouping-parentheses2.t/input.sh diff --git a/tests/good/2.9-shell_commands/2.9.4_compound_commands/if/else-no-sep-2.sh.expected b/tests/golden/good/2.9-shell-commands/2.9.4-compound-commands/if/else-no-sep-2.t/expected.json similarity index 100% rename from tests/good/2.9-shell_commands/2.9.4_compound_commands/if/else-no-sep-2.sh.expected rename to tests/golden/good/2.9-shell-commands/2.9.4-compound-commands/if/else-no-sep-2.t/expected.json diff --git a/tests/good/2.9-shell_commands/2.9.4_compound_commands/if/else-no-sep-2.sh b/tests/golden/good/2.9-shell-commands/2.9.4-compound-commands/if/else-no-sep-2.t/input.sh similarity index 100% rename from tests/good/2.9-shell_commands/2.9.4_compound_commands/if/else-no-sep-2.sh rename to tests/golden/good/2.9-shell-commands/2.9.4-compound-commands/if/else-no-sep-2.t/input.sh diff --git a/tests/good/2.9-shell_commands/2.9.4_compound_commands/if/else-no-sep.sh.expected b/tests/golden/good/2.9-shell-commands/2.9.4-compound-commands/if/else-no-sep.t/expected.json similarity index 100% rename from tests/good/2.9-shell_commands/2.9.4_compound_commands/if/else-no-sep.sh.expected rename to tests/golden/good/2.9-shell-commands/2.9.4-compound-commands/if/else-no-sep.t/expected.json diff --git a/tests/good/2.9-shell_commands/2.9.4_compound_commands/if/else-no-sep.sh b/tests/golden/good/2.9-shell-commands/2.9.4-compound-commands/if/else-no-sep.t/input.sh similarity index 100% rename from tests/good/2.9-shell_commands/2.9.4_compound_commands/if/else-no-sep.sh rename to tests/golden/good/2.9-shell-commands/2.9.4-compound-commands/if/else-no-sep.t/input.sh diff --git a/tests/good/2.9-shell_commands/2.9.4_compound_commands/if/if.sh.expected b/tests/golden/good/2.9-shell-commands/2.9.4-compound-commands/if/if.t/expected.json similarity index 100% rename from tests/good/2.9-shell_commands/2.9.4_compound_commands/if/if.sh.expected rename to tests/golden/good/2.9-shell-commands/2.9.4-compound-commands/if/if.t/expected.json diff --git a/tests/good/2.9-shell_commands/2.9.4_compound_commands/if/if.sh b/tests/golden/good/2.9-shell-commands/2.9.4-compound-commands/if/if.t/input.sh similarity index 100% rename from tests/good/2.9-shell_commands/2.9.4_compound_commands/if/if.sh rename to tests/golden/good/2.9-shell-commands/2.9.4-compound-commands/if/if.t/input.sh diff --git a/tests/good/2.9-shell_commands/2.9.4_compound_commands/if/if2.sh.expected b/tests/golden/good/2.9-shell-commands/2.9.4-compound-commands/if/if2.t/expected.json similarity index 100% rename from tests/good/2.9-shell_commands/2.9.4_compound_commands/if/if2.sh.expected rename to tests/golden/good/2.9-shell-commands/2.9.4-compound-commands/if/if2.t/expected.json diff --git a/tests/good/2.9-shell_commands/2.9.4_compound_commands/if/if2.sh b/tests/golden/good/2.9-shell-commands/2.9.4-compound-commands/if/if2.t/input.sh similarity index 100% rename from tests/good/2.9-shell_commands/2.9.4_compound_commands/if/if2.sh rename to tests/golden/good/2.9-shell-commands/2.9.4-compound-commands/if/if2.t/input.sh diff --git a/tests/good/2.9-shell_commands/2.9.4_compound_commands/if/if3.sh.expected b/tests/golden/good/2.9-shell-commands/2.9.4-compound-commands/if/if3.t/expected.json similarity index 100% rename from tests/good/2.9-shell_commands/2.9.4_compound_commands/if/if3.sh.expected rename to tests/golden/good/2.9-shell-commands/2.9.4-compound-commands/if/if3.t/expected.json diff --git a/tests/good/2.9-shell_commands/2.9.4_compound_commands/if/if3.sh b/tests/golden/good/2.9-shell-commands/2.9.4-compound-commands/if/if3.t/input.sh similarity index 100% rename from tests/good/2.9-shell_commands/2.9.4_compound_commands/if/if3.sh rename to tests/golden/good/2.9-shell-commands/2.9.4-compound-commands/if/if3.t/input.sh diff --git a/tests/good/2.9-shell_commands/2.9.4_compound_commands/no_need_for_compound_list.sh.expected b/tests/golden/good/2.9-shell-commands/2.9.4-compound-commands/no-need-for-compound-list.t/expected.json similarity index 100% rename from tests/good/2.9-shell_commands/2.9.4_compound_commands/no_need_for_compound_list.sh.expected rename to tests/golden/good/2.9-shell-commands/2.9.4-compound-commands/no-need-for-compound-list.t/expected.json diff --git a/tests/good/2.9-shell_commands/2.9.4_compound_commands/no_need_for_compound_list.sh b/tests/golden/good/2.9-shell-commands/2.9.4-compound-commands/no-need-for-compound-list.t/input.sh similarity index 100% rename from tests/good/2.9-shell_commands/2.9.4_compound_commands/no_need_for_compound_list.sh rename to tests/golden/good/2.9-shell-commands/2.9.4-compound-commands/no-need-for-compound-list.t/input.sh diff --git a/tests/good/2.9-shell_commands/2.9.4_compound_commands/reserved_words_in_compound_list.sh.expected b/tests/golden/good/2.9-shell-commands/2.9.4-compound-commands/reserved-words-in-compound-list.t/expected.json similarity index 100% rename from tests/good/2.9-shell_commands/2.9.4_compound_commands/reserved_words_in_compound_list.sh.expected rename to tests/golden/good/2.9-shell-commands/2.9.4-compound-commands/reserved-words-in-compound-list.t/expected.json diff --git a/tests/good/2.9-shell_commands/2.9.4_compound_commands/reserved_words_in_compound_list.sh b/tests/golden/good/2.9-shell-commands/2.9.4-compound-commands/reserved-words-in-compound-list.t/input.sh similarity index 100% rename from tests/good/2.9-shell_commands/2.9.4_compound_commands/reserved_words_in_compound_list.sh rename to tests/golden/good/2.9-shell-commands/2.9.4-compound-commands/reserved-words-in-compound-list.t/input.sh diff --git a/tests/good/2.9-shell_commands/2.9.4_compound_commands/until/no-semicolon-before-do.sh.expected b/tests/golden/good/2.9-shell-commands/2.9.4-compound-commands/until/no-semicolon-before-do.t/expected.json similarity index 100% rename from tests/good/2.9-shell_commands/2.9.4_compound_commands/until/no-semicolon-before-do.sh.expected rename to tests/golden/good/2.9-shell-commands/2.9.4-compound-commands/until/no-semicolon-before-do.t/expected.json diff --git a/tests/good/2.9-shell_commands/2.9.4_compound_commands/until/no-semicolon-before-done.sh.expected b/tests/golden/good/2.9-shell-commands/2.9.4-compound-commands/until/no-semicolon-before-done.t/expected.json similarity index 100% rename from tests/good/2.9-shell_commands/2.9.4_compound_commands/until/no-semicolon-before-done.sh.expected rename to tests/golden/good/2.9-shell-commands/2.9.4-compound-commands/until/no-semicolon-before-done.t/expected.json diff --git a/tests/good/2.9-shell_commands/2.9.4_compound_commands/while/no-semicolon-before-do.sh.expected b/tests/golden/good/2.9-shell-commands/2.9.4-compound-commands/while/no-semicolon-before-do.t/expected.json similarity index 100% rename from tests/good/2.9-shell_commands/2.9.4_compound_commands/while/no-semicolon-before-do.sh.expected rename to tests/golden/good/2.9-shell-commands/2.9.4-compound-commands/while/no-semicolon-before-do.t/expected.json diff --git a/tests/good/2.9-shell_commands/2.9.4_compound_commands/while/no-semicolon-before-done.sh.expected b/tests/golden/good/2.9-shell-commands/2.9.4-compound-commands/while/no-semicolon-before-done.t/expected.json similarity index 100% rename from tests/good/2.9-shell_commands/2.9.4_compound_commands/while/no-semicolon-before-done.sh.expected rename to tests/golden/good/2.9-shell-commands/2.9.4-compound-commands/while/no-semicolon-before-done.t/expected.json diff --git a/tests/good/2.9-shell_commands/2.9.5_function-definition-command/bracegroup.sh.expected b/tests/golden/good/2.9-shell-commands/2.9.5-function-definition-command/bracegroup.t/expected.json similarity index 100% rename from tests/good/2.9-shell_commands/2.9.5_function-definition-command/bracegroup.sh.expected rename to tests/golden/good/2.9-shell-commands/2.9.5-function-definition-command/bracegroup.t/expected.json diff --git a/tests/good/2.9-shell_commands/2.9.5_function-definition-command/bracegroup.sh b/tests/golden/good/2.9-shell-commands/2.9.5-function-definition-command/bracegroup.t/input.sh similarity index 100% rename from tests/good/2.9-shell_commands/2.9.5_function-definition-command/bracegroup.sh rename to tests/golden/good/2.9-shell-commands/2.9.5-function-definition-command/bracegroup.t/input.sh diff --git a/tests/good/2.9-shell_commands/2.9.5_function-definition-command/bracegroup2.sh.expected b/tests/golden/good/2.9-shell-commands/2.9.5-function-definition-command/bracegroup2.t/expected.json similarity index 100% rename from tests/good/2.9-shell_commands/2.9.5_function-definition-command/bracegroup2.sh.expected rename to tests/golden/good/2.9-shell-commands/2.9.5-function-definition-command/bracegroup2.t/expected.json diff --git a/tests/good/2.9-shell_commands/2.9.5_function-definition-command/bracegroup2.sh b/tests/golden/good/2.9-shell-commands/2.9.5-function-definition-command/bracegroup2.t/input.sh similarity index 100% rename from tests/good/2.9-shell_commands/2.9.5_function-definition-command/bracegroup2.sh rename to tests/golden/good/2.9-shell-commands/2.9.5-function-definition-command/bracegroup2.t/input.sh diff --git a/tests/good/2.9-shell_commands/2.9.5_function-definition-command/if-redirection.sh.expected b/tests/golden/good/2.9-shell-commands/2.9.5-function-definition-command/if-redirection.t/expected.json similarity index 100% rename from tests/good/2.9-shell_commands/2.9.5_function-definition-command/if-redirection.sh.expected rename to tests/golden/good/2.9-shell-commands/2.9.5-function-definition-command/if-redirection.t/expected.json diff --git a/tests/good/2.9-shell_commands/2.9.5_function-definition-command/if-redirection.sh b/tests/golden/good/2.9-shell-commands/2.9.5-function-definition-command/if-redirection.t/input.sh similarity index 100% rename from tests/good/2.9-shell_commands/2.9.5_function-definition-command/if-redirection.sh rename to tests/golden/good/2.9-shell-commands/2.9.5-function-definition-command/if-redirection.t/input.sh diff --git a/tests/good/2.9-shell_commands/2.9.5_function-definition-command/if.sh.expected b/tests/golden/good/2.9-shell-commands/2.9.5-function-definition-command/if.t/expected.json similarity index 100% rename from tests/good/2.9-shell_commands/2.9.5_function-definition-command/if.sh.expected rename to tests/golden/good/2.9-shell-commands/2.9.5-function-definition-command/if.t/expected.json diff --git a/tests/good/2.9-shell_commands/2.9.5_function-definition-command/if.sh b/tests/golden/good/2.9-shell-commands/2.9.5-function-definition-command/if.t/input.sh similarity index 100% rename from tests/good/2.9-shell_commands/2.9.5_function-definition-command/if.sh rename to tests/golden/good/2.9-shell-commands/2.9.5-function-definition-command/if.t/input.sh diff --git a/tests/good/2.9-shell_commands/2.9.5_function-definition-command/parentheses.sh.expected b/tests/golden/good/2.9-shell-commands/2.9.5-function-definition-command/parentheses.t/expected.json similarity index 100% rename from tests/good/2.9-shell_commands/2.9.5_function-definition-command/parentheses.sh.expected rename to tests/golden/good/2.9-shell-commands/2.9.5-function-definition-command/parentheses.t/expected.json diff --git a/tests/good/2.9-shell_commands/2.9.5_function-definition-command/parentheses.sh b/tests/golden/good/2.9-shell-commands/2.9.5-function-definition-command/parentheses.t/input.sh similarity index 100% rename from tests/good/2.9-shell_commands/2.9.5_function-definition-command/parentheses.sh rename to tests/golden/good/2.9-shell-commands/2.9.5-function-definition-command/parentheses.t/input.sh diff --git a/tests/good/2.9-shell_commands/2.9.5_function-definition-command/parentheses2.sh.expected b/tests/golden/good/2.9-shell-commands/2.9.5-function-definition-command/parentheses2.t/expected.json similarity index 100% rename from tests/good/2.9-shell_commands/2.9.5_function-definition-command/parentheses2.sh.expected rename to tests/golden/good/2.9-shell-commands/2.9.5-function-definition-command/parentheses2.t/expected.json diff --git a/tests/good/2.9-shell_commands/2.9.5_function-definition-command/parentheses2.sh b/tests/golden/good/2.9-shell-commands/2.9.5-function-definition-command/parentheses2.t/input.sh similarity index 100% rename from tests/good/2.9-shell_commands/2.9.5_function-definition-command/parentheses2.sh rename to tests/golden/good/2.9-shell-commands/2.9.5-function-definition-command/parentheses2.t/input.sh diff --git a/tests/good/2.9-shell_commands/2.9.5_function-definition-command/redirection_filedescriptor_in_function.sh.expected b/tests/golden/good/2.9-shell-commands/2.9.5-function-definition-command/redirection-filedescriptor-in-function.t/expected.json similarity index 100% rename from tests/good/2.9-shell_commands/2.9.5_function-definition-command/redirection_filedescriptor_in_function.sh.expected rename to tests/golden/good/2.9-shell-commands/2.9.5-function-definition-command/redirection-filedescriptor-in-function.t/expected.json diff --git a/tests/good/2.9-shell_commands/2.9.5_function-definition-command/redirection_filedescriptor_in_function.sh b/tests/golden/good/2.9-shell-commands/2.9.5-function-definition-command/redirection-filedescriptor-in-function.t/input.sh similarity index 100% rename from tests/good/2.9-shell_commands/2.9.5_function-definition-command/redirection_filedescriptor_in_function.sh rename to tests/golden/good/2.9-shell-commands/2.9.5-function-definition-command/redirection-filedescriptor-in-function.t/input.sh diff --git a/tests/good/2.9-shell_commands/2.9.5_function-definition-command/until-with-redirection.sh.expected b/tests/golden/good/2.9-shell-commands/2.9.5-function-definition-command/until-with-redirection.t/expected.json similarity index 100% rename from tests/good/2.9-shell_commands/2.9.5_function-definition-command/until-with-redirection.sh.expected rename to tests/golden/good/2.9-shell-commands/2.9.5-function-definition-command/until-with-redirection.t/expected.json diff --git a/tests/good/2.9-shell_commands/2.9.5_function-definition-command/until-with-redirection.sh b/tests/golden/good/2.9-shell-commands/2.9.5-function-definition-command/until-with-redirection.t/input.sh similarity index 100% rename from tests/good/2.9-shell_commands/2.9.5_function-definition-command/until-with-redirection.sh rename to tests/golden/good/2.9-shell-commands/2.9.5-function-definition-command/until-with-redirection.t/input.sh diff --git a/tests/good/2.9-shell_commands/2.9.5_function-definition-command/until.sh.expected b/tests/golden/good/2.9-shell-commands/2.9.5-function-definition-command/until.t/expected.json similarity index 100% rename from tests/good/2.9-shell_commands/2.9.5_function-definition-command/until.sh.expected rename to tests/golden/good/2.9-shell-commands/2.9.5-function-definition-command/until.t/expected.json diff --git a/tests/good/2.9-shell_commands/2.9.5_function-definition-command/until.sh b/tests/golden/good/2.9-shell-commands/2.9.5-function-definition-command/until.t/input.sh similarity index 100% rename from tests/good/2.9-shell_commands/2.9.5_function-definition-command/until.sh rename to tests/golden/good/2.9-shell-commands/2.9.5-function-definition-command/until.t/input.sh diff --git a/tests/good/2.9-shell_commands/2.9.5_function-definition-command/while.sh.expected b/tests/golden/good/2.9-shell-commands/2.9.5-function-definition-command/while.t/expected.json similarity index 100% rename from tests/good/2.9-shell_commands/2.9.5_function-definition-command/while.sh.expected rename to tests/golden/good/2.9-shell-commands/2.9.5-function-definition-command/while.t/expected.json diff --git a/tests/good/2.9-shell_commands/2.9.5_function-definition-command/while.sh b/tests/golden/good/2.9-shell-commands/2.9.5-function-definition-command/while.t/input.sh similarity index 100% rename from tests/good/2.9-shell_commands/2.9.5_function-definition-command/while.sh rename to tests/golden/good/2.9-shell-commands/2.9.5-function-definition-command/while.t/input.sh diff --git a/tests/good/assignment_empty.sh.expected b/tests/golden/good/assignment-empty.t/expected.json similarity index 100% rename from tests/good/assignment_empty.sh.expected rename to tests/golden/good/assignment-empty.t/expected.json diff --git a/tests/good/assignment_empty.sh b/tests/golden/good/assignment-empty.t/input.sh similarity index 100% rename from tests/good/assignment_empty.sh rename to tests/golden/good/assignment-empty.t/input.sh diff --git a/tests/good/assignment_eof.sh.expected b/tests/golden/good/assignment-eof.t/expected.json similarity index 100% rename from tests/good/assignment_eof.sh.expected rename to tests/golden/good/assignment-eof.t/expected.json diff --git a/tests/good/assignment_eof.sh b/tests/golden/good/assignment-eof.t/input.sh similarity index 100% rename from tests/good/assignment_eof.sh rename to tests/golden/good/assignment-eof.t/input.sh diff --git a/tests/good/comment-no-newline.sh.expected b/tests/golden/good/comment-no-newline.t/expected.json similarity index 100% rename from tests/good/comment-no-newline.sh.expected rename to tests/golden/good/comment-no-newline.t/expected.json diff --git a/tests/good/comment-no-newline.sh b/tests/golden/good/comment-no-newline.t/input.sh similarity index 100% rename from tests/good/comment-no-newline.sh rename to tests/golden/good/comment-no-newline.t/input.sh diff --git a/tests/good/fake-arithmetic.sh b/tests/golden/good/fake-arithmetic.t/input.sh similarity index 100% rename from tests/good/fake-arithmetic.sh rename to tests/golden/good/fake-arithmetic.t/input.sh diff --git a/tests/good/fake-arithmetic.sh.open b/tests/golden/good/fake-arithmetic.t/open similarity index 100% rename from tests/good/fake-arithmetic.sh.open rename to tests/golden/good/fake-arithmetic.t/open diff --git a/tests/good/reserved_words.sh.expected b/tests/golden/good/reserved-words.t/expected.json similarity index 100% rename from tests/good/reserved_words.sh.expected rename to tests/golden/good/reserved-words.t/expected.json diff --git a/tests/good/you-should-not-see-this.sh b/tests/golden/good/you-should-not-see-this.t/input.sh similarity index 100% rename from tests/good/you-should-not-see-this.sh rename to tests/golden/good/you-should-not-see-this.t/input.sh diff --git a/tests/good/you-should-not-see-this.sh.open b/tests/golden/good/you-should-not-see-this.t/open similarity index 100% rename from tests/good/you-should-not-see-this.sh.open rename to tests/golden/good/you-should-not-see-this.t/open diff --git a/tests/run b/tests/golden/run similarity index 79% rename from tests/run rename to tests/golden/run index 0aef0196..57c21132 100755 --- a/tests/run +++ b/tests/golden/run @@ -19,7 +19,7 @@ find . \( -name '*.sjson' -o -name '*.morbigerror' \) -delete ## ========= Find morbig; either in this directory, or in the $PATH ========= ## -localmorbig=../bin/morbig +localmorbig=../../bin/morbig if [ -e "$localmorbig" ]; then morbig=$(realpath "$localmorbig") @@ -70,16 +70,12 @@ printf_for_test () { ## there is not much to do about `unspecified` and `unknown` ones. for category in good bad; do - ## For all test files in the test category in question. - for test in $(find "$category" -type f -name '*.sh' | sort -n); do - test=${test%.sh} + ## For all test directories in the test category in question. + for test in $(find "$category" -type d -name '*.t' | sort -n); do - ## If the test file does not exist, then something is wrong, and it is - ## probably due to the fact that one test name contains spaces and was - ## therefore cut in two by the `$(find ...)` above. - if ! [ -f "$test.sh" ]; then - printf_for_test '[WARN] File `%s` does not exist or is not a file. -Did you create a test whose name contains a space?\n' "$test" + ## If the test file does not exist, then something is wrong. + if ! [ -f "$test"/input.sh ]; then + printf_for_test '[WARN] File `%s` does not exist or is not a file.\n' "$test"/input.sh continue fi @@ -87,12 +83,12 @@ Did you create a test whose name contains a space?\n' "$test" ## write `$category$open` and it will be either `good`, `good_open` or ## `bad`. The underscore therefore matters. open= - [ -e "$test.sh.open" ] && open=_open + [ -e "$test"/open ] && open=_open incr ${category}${open}_total - ## If Morbig succeeds, a file "$test.sh.sjson" gets created. - if "$morbig" --as simple "$test.sh" 2>/dev/null; then + ## If Morbig succeeds, a file "$test/input.sh.sjson" gets created. + if "$morbig" --as simple "$test"/input.sh 2>/dev/null; then case $category$open in bad) printf_for_test '[FAIL] Wrongly accepted: %s\n' "$test" @@ -108,30 +104,30 @@ Did you create a test whose name contains a space?\n' "$test" ## Normalise the output using `jq`. This ensures that our ## tests do not fail just because Yojson changed its ## printing behaviour. - cat "$test.sh.sjson" | jq . > "$test.sh.sjson.clean" - mv "$test.sh.sjson.clean" "$test.sh.sjson" + cat "$test"/input.sh.sjson | jq . > "$test"/input.sh.sjson.clean + mv "$test"/input.sh.sjson.clean "$test"/input.sh.sjson - ## If there is no `.expected` file, then we complain, and we + ## If there is no `expected.json` file, then we complain, and we ## count this case as “unexpected”. - if ! [ -f "$test.sh.expected" ]; then - printf_for_test '[WARN] Missing `.expected` file: %s\n' "$test" + if ! [ -f "$test"/expected.json ]; then + printf_for_test '[WARN] Missing `expected.json` file in: %s\n' "$test" incr good${open}_unexpected ## Otherwise, if there is a difference between the produced ## file and the expected one, then we complain. - elif ! diff "$test.sh.sjson" "$test.sh.expected" 2>&1 >/dev/null; then + elif ! diff "$test"/input.sh.sjson "$test"/expected.json 2>&1 >/dev/null; then if [ -n "$open" ]; then printf_for_test '[WARN] Open with wrong output: %s\n' "$test" else printf_for_test '[FAIL] Wrong output: %s\n' "$test" fi if [ -n "$VERBOSE" ]; then - echo '** .sh' - cat "$test.sh" - echo '** .sh.sjson' - cat "$test.sh.sjson" - echo '** .sh.expected' - cat "$test.sh.expected" + echo '** input.sh' + cat "$test"/input.sh + echo '** input.sh.sjson' + cat "$test"/input.sh.sjson + echo '** expected.json' + cat "$test"/expected.json fi incr good${open}_unexpected @@ -156,8 +152,8 @@ Did you create a test whose name contains a space?\n' "$test" printf_for_test '[FAIL] Wrongly rejected: %s\n' "$test" fi if [ -n "$VERBOSE" ]; then - echo "** $test.sh" - cat "$test.sh" + echo '** input.sh' + cat "$test"/input.sh fi esac fi diff --git a/tests/unknown/escaped-eof.sh b/tests/golden/unknown/escaped-eof.t/input.sh similarity index 100% rename from tests/unknown/escaped-eof.sh rename to tests/golden/unknown/escaped-eof.t/input.sh diff --git a/tests/unspecified/backquotes-terminted-by-here-document.sh b/tests/golden/unspecified/backquotes-terminted-by-here-document.t/input.sh similarity index 100% rename from tests/unspecified/backquotes-terminted-by-here-document.sh rename to tests/golden/unspecified/backquotes-terminted-by-here-document.t/input.sh diff --git a/tests/unspecified/grouping-pparentheses.sh b/tests/golden/unspecified/grouping-pparentheses.t/input.sh similarity index 100% rename from tests/unspecified/grouping-pparentheses.sh rename to tests/golden/unspecified/grouping-pparentheses.t/input.sh diff --git a/tests/unspecified/reserved_bbracket_left.sh b/tests/golden/unspecified/reserved-bbracket-left.t/input.sh similarity index 100% rename from tests/unspecified/reserved_bbracket_left.sh rename to tests/golden/unspecified/reserved-bbracket-left.t/input.sh diff --git a/tests/unspecified/reserved_bbracket_right.sh b/tests/golden/unspecified/reserved-bbracket-right.t/input.sh similarity index 100% rename from tests/unspecified/reserved_bbracket_right.sh rename to tests/golden/unspecified/reserved-bbracket-right.t/input.sh diff --git a/tests/unspecified/reserved_colon.sh b/tests/golden/unspecified/reserved-colon.t/input.sh similarity index 100% rename from tests/unspecified/reserved_colon.sh rename to tests/golden/unspecified/reserved-colon.t/input.sh diff --git a/tests/unspecified/reserved_function.sh b/tests/golden/unspecified/reserved-function.t/input.sh similarity index 100% rename from tests/unspecified/reserved_function.sh rename to tests/golden/unspecified/reserved-function.t/input.sh diff --git a/tests/unspecified/reserved_select.sh b/tests/golden/unspecified/reserved-select.t/input.sh similarity index 100% rename from tests/unspecified/reserved_select.sh rename to tests/golden/unspecified/reserved-select.t/input.sh