Skip to content

fix: reduce skipped spec tests, implement cut/tr features (#309, #314)#391

Merged
chaliy merged 2 commits intomainfrom
claude/process-issues-and-prs-Vvs93
Feb 28, 2026
Merged

fix: reduce skipped spec tests, implement cut/tr features (#309, #314)#391
chaliy merged 2 commits intomainfrom
claude/process-issues-and-prs-Vvs93

Conversation

@chaliy
Copy link
Contributor

@chaliy chaliy commented Feb 28, 2026

Summary

  • Reduce skipped spec tests from 56 to 33 (23 tests unskipped) by fixing IFS word splitting for $*/$@, set builtin positional params, parse error detection, and variable name validation
  • Implement missing cut/tr features: cut -c/-b, --complement, --output-delimiter, -s, -z; tr -s/-c/-C and character classes ([:lower:], [:upper:], [:digit:], [:alpha:], [:alnum:], [:space:], [:blank:], [:punct:])
  • Add 30+ new cut/tr spec tests

Test plan

  • cargo test --all-features passes (all spec tests, comparison tests, unit tests)
  • cargo fmt --check clean
  • cargo clippy --all-targets --all-features -- -D warnings clean
  • New cut/tr tests all pass against real bash in comparison tests
  • All previously-passing word-split/quote/parse-error tests still pass

Closes #309 (partially), closes #314

Word-split (25→10 skips): fix $*/$@ with IFS, set positional params,
"$*" join with IFS first char, empty/unset IFS distinction, bracket
word parsing for ["$*"], quoted assignment values.

Parse-errors (11→6 skips): bad substitution ${%} detection, export/local
var name validation, for-loop var name validation.

Quote (2→0 skips): empty string preservation, adjacent single-quoted
string joining.

Also fix set -euo pipefail regression (combined -o flag handling).

https://claude.ai/code/session_01QbjrsMFJbHy5XfHCzA6TjM
…314)

Add cut character mode (-c/-b), complement (--complement), output
delimiter, only-delimited (-s), zero-terminated (-z). Add tr squeeze
(-s), complement (-c/-C), and character classes [:lower:], [:upper:],
[:digit:], [:alpha:], [:alnum:], [:space:], [:blank:], [:punct:].
Add 30+ new spec tests for cut/tr features.

https://claude.ai/code/session_01QbjrsMFJbHy5XfHCzA6TjM
@chaliy chaliy merged commit 6e0afff into main Feb 28, 2026
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: implement missing cut/tr features (cut -c, tr -s/-c, character classes) test: fix 66 skipped spec tests tracked in spec_tests.rs

2 participants