I made a fork of Bash and have been working through its test suite by converting it to Ruby test files for rubish in a branch. That branch isn't meant to feed into the actual upstream rubish project, though I guess you could if you wanted. I am more using it to gather information on where the Bash syntax parity gaps still are so I could submit fixes.
Things are looking pretty good! It looks like about 75% of the bash suite tests pass. If you want to see the gaps that remain, you can find the test files I generated here (./tests/test_bash_suite_*.rb).
Current state: 438 bash suite parity tests, 331 passing, 107 omitted (75%)
Each omitted test is marked with an omit reason rather than a failure, so the suite stays green. Omits identify unimplemented features, not regressions.
What's covered
27 test files covering: arith, arith-for, array, appendop, braces, builtins,
case, comsub, cond, exp/new-exp/more-exp, func, heredoc/herestr, ifs, invert,
loops, nquote, posixpat, posixpipe, printf, quote, read, redir, strip, subshell,
test, tilde, varenv.
Top gaps to close (by omissions unblocked)
- POSIX character classes
[[:alpha:]] etc. in case/glob — 15 tests
- Arith operators
==, !=, +=/-=/etc., prefix ++/--, (()) null expr, short-circuit &&/|| — ~17 tests
$'...' ANSI C quoting — 8 tests
- Functions: IOError on define/call — 5 tests
- Tilde expansion (
~, ~/path, in assignments) — 5 tests
read x <<<val here-string with read — 5 tests
- Multi-line heredoc in REPL — 5 tests
- Anchored substitution
${x/#pat/rep} / ${x/%pat/rep} — 4 tests
- IFS word splitting in
for loop — 4 tests
return N in functions — uncaught :return throw — 3 tests
Not yet converted (practical)
alias, assoc, attr, casemod, comsub2, extglob, getopts, glob, ifs-posix,
nameref, parser, posixexp, precedence, set-e, set-x, shopt, tilde2, trap, type,
vredir, and more.
Full tracking doc: test_bash_suite.md
I'm not sure if you are interested in taking a crack at any of the remaining ones or not @amatsuda. I am not sure how much time I will have this week to do any more of these, but if you have a preference for any of them, let me know in the comments on this issue.
I made a fork of Bash and have been working through its test suite by converting it to Ruby test files for rubish in a branch. That branch isn't meant to feed into the actual upstream rubish project, though I guess you could if you wanted. I am more using it to gather information on where the Bash syntax parity gaps still are so I could submit fixes.
Things are looking pretty good! It looks like about 75% of the bash suite tests pass. If you want to see the gaps that remain, you can find the test files I generated here (
./tests/test_bash_suite_*.rb).Current state: 438 bash suite parity tests, 331 passing, 107 omitted (75%)
Each omitted test is marked with an
omitreason rather than a failure, so the suite stays green. Omits identify unimplemented features, not regressions.What's covered
27 test files covering: arith, arith-for, array, appendop, braces, builtins,
case, comsub, cond, exp/new-exp/more-exp, func, heredoc/herestr, ifs, invert,
loops, nquote, posixpat, posixpipe, printf, quote, read, redir, strip, subshell,
test, tilde, varenv.
Top gaps to close (by omissions unblocked)
[[:alpha:]]etc. in case/glob — 15 tests==,!=,+=/-=/etc., prefix++/--,(())null expr, short-circuit&&/||— ~17 tests$'...'ANSI C quoting — 8 tests~,~/path, in assignments) — 5 testsread x <<<valhere-string with read — 5 tests${x/#pat/rep}/${x/%pat/rep}— 4 testsforloop — 4 testsreturn Nin functions — uncaught:returnthrow — 3 testsNot yet converted (practical)
alias, assoc, attr, casemod, comsub2, extglob, getopts, glob, ifs-posix,
nameref, parser, posixexp, precedence, set-e, set-x, shopt, tilde2, trap, type,
vredir, and more.
Full tracking doc: test_bash_suite.md
I'm not sure if you are interested in taking a crack at any of the remaining ones or not @amatsuda. I am not sure how much time I will have this week to do any more of these, but if you have a preference for any of them, let me know in the comments on this issue.