Skip to content

fix(wc): match real bash output padding behavior#342

Merged
chaliy merged 2 commits intomainfrom
claude/fix-322-wc-padding-TjcEQ
Feb 27, 2026
Merged

fix(wc): match real bash output padding behavior#342
chaliy merged 2 commits intomainfrom
claude/fix-322-wc-padding-TjcEQ

Conversation

@chaliy
Copy link
Copy Markdown
Contributor

@chaliy chaliy commented Feb 27, 2026

Summary

  • Single-value stdin output: no padding (matches real bash)
  • Multi-value stdin output: 7-char right-aligned fields with space separator
  • File output: always padded with 7-char fields
  • Remove 19 bash_diff markers from wc.test.sh (keep 1 for locale-dependent unicode)

Closes #322

Test plan

  • cargo test --test spec_tests passes (all 13 tests including bash_comparison_tests)
  • cargo test --all-features passes
  • 933/934 comparison tests match real bash (99.9%, only unicode locale diff remains)

Single-value stdin: no padding. Multi-value stdin: 7-char right-aligned
fields with space separator. File output: always padded. Remove all
bash_diff markers except locale-dependent unicode chars test.

Closes #322
@chaliy chaliy merged commit 91ee983 into main Feb 27, 2026
16 checks passed
@chaliy chaliy deleted the claude/fix-322-wc-padding-TjcEQ branch February 27, 2026 04:14
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.

bug: wc output padding differs from real bash for all stdin inputs

2 participants