Skip to content

fix(test): trim whitespace in parse_int for integer comparisons#293

Merged
chaliy merged 1 commit intomainfrom
claude/issue-276-parse-int-trim-76a2F
Feb 26, 2026
Merged

fix(test): trim whitespace in parse_int for integer comparisons#293
chaliy merged 1 commit intomainfrom
claude/issue-276-parse-int-trim-76a2F

Conversation

@chaliy
Copy link
Copy Markdown
Contributor

@chaliy chaliy commented Feb 26, 2026

Summary

  • parse_int in the test/[ builtin now calls .trim() before parsing, matching real bash behavior
  • Fixes wc output (space-padded numbers) breaking [ "$count" -ge N ] comparisons

Test plan

  • issue_276_parse_int_trims_whitespace — verifies [ " 3 " -ge 2 ] works
  • issue_276_wc_output_in_comparison — verifies wc pipeline output in comparison

Closes #276

@chaliy chaliy merged commit 2e06425 into main Feb 26, 2026
16 checks passed
@chaliy chaliy deleted the claude/issue-276-parse-int-trim-76a2F branch March 12, 2026 03:42
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: test builtin parse_int doesn't trim whitespace, breaks integer comparisons

2 participants