test: add 14 Oils-inspired spec test files (244 tests)#351
Merged
Conversation
Add comprehensive spec tests for bashkit behaviors not previously covered,
inspired by the Oils (oilshell) test suite methodology. Each file links to
the original Oils test for reference.
New test files (high-value gaps):
- word-split.test.sh: 39 tests for IFS, $@/$*, word elision (36 skipped)
- quote.test.sh: 22 tests for quoting edge cases (11 skipped)
- parse-errors.test.sh: 18 tests for parser error detection (11 skipped)
- shell-grammar.test.sh: 22 tests for grammar edge cases (0 skipped)
- empty-bodies.test.sh: 8 tests for empty loop/function bodies (5 skipped)
- exit-status.test.sh: 17 tests for exit code propagation (9 skipped)
- subshell.test.sh: 13 tests for subshell isolation (4 skipped)
New test files (medium-value gaps):
- nameref.test.sh: 14 tests for local -n / typeset -n (14 skipped)
- var-op-test.test.sh: 19 tests for ${:-} ${:+} ${:=} ${:?} (14 skipped)
- heredoc-edge.test.sh: 16 tests for heredoc edge cases (6 skipped)
- unicode.test.sh: 17 tests for unicode handling (6 skipped)
- alias.test.sh: 15 tests for alias expansion (15 skipped)
- temp-binding.test.sh: 10 tests for FOO=bar cmd (0 skipped)
- arith-dynamic.test.sh: 14 tests for dynamic arithmetic (5 skipped)
Total: 244 new tests, 108 passing, 136 skipped with TODO markers.
https://claude.ai/code/session_01PaZ7p23KzidUUWEP5DwDYN
This was referenced Feb 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
High-value test coverage (7 files, 139 tests):
word-split.test.sh$@/$*, word elisionquote.test.sh$'',$"", adjacent single quotesparse-errors.test.shshell-grammar.test.shempty-bodies.test.shexit-status.test.shsubshell.test.shMedium-value test coverage (7 files, 105 tests):
nameref.test.shlocal -n/typeset -nnot implementedvar-op-test.test.sh${@-val},${arr[@]+val}, backslash escapesheredoc-edge.test.shunicode.test.sh$'\u...', printf\u,${#x}byte vs charalias.test.shtemp-binding.test.sharith-dynamic.test.sh$((...))Test plan
cargo test --test spec_testspasses (all 13 suites green)cargo test --test spec_tests -- bash_comparison_testspasses