Improve GNU sed testsuite compatibility#345
Improve GNU sed testsuite compatibility#345kevinburkesegment wants to merge 1 commit intouutils:mainfrom
Conversation
cf46e9e to
60beef3
Compare
|
GNU sed testsuite comparison: |
60beef3 to
e391df1
Compare
|
GNU sed testsuite comparison: |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #345 +/- ##
==========================================
- Coverage 82.16% 81.92% -0.25%
==========================================
Files 13 13
Lines 5444 5454 +10
Branches 304 312 +8
==========================================
- Hits 4473 4468 -5
- Misses 969 984 +15
Partials 2 2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Sorry but only one commit implementating all the changes isn't the best practice. In a perfect world, one pr changes or at least one commit per fix in this pr |
|
For example, it makes it hard to know what is cover by an existing test or not |
- Fix `l` command default width from 60 to 70 (matching GNU sed) - Wire `-l` flag and COLS env var to `l` command width - Reject `l<N>` (GNU extension) in --posix mode - Accept `}` and `#` as valid command terminators (fixes command-endings) - Accept `}` and `#` as valid substitute flag terminators - Eat spaces before command endings (e.g. `y/1/a/ ;d`) - Scope `#n` silent mode to first script source only (fixes comment-n) - Drop backslash for unknown escape sequences in s/// replacement (GNU behavior) - Match GNU sed error message format: `-e expression #N, char C:` for string scripts, `file:line:` for file scripts - Add `get_source_index()` to ScriptLineProvider - Add test-results.txt to .gitignore GNU testsuite results: 7 → 9 passing (command-endings, comment-n now pass). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
e391df1 to
e73ac32
Compare
|
GNU sed testsuite comparison: |
Merging this PR will improve performance by 2.29%
Performance Changes
Comparing |
lcommand default width from 60 to 70 (matching GNU sed)-lflag and COLS env var tolcommand widthl<N>(GNU extension) in --posix mode}and#as valid command terminators (fixes command-endings)}and#as valid substitute flag terminatorsy/1/a/ ;d)#nsilent mode to first script source only (fixes comment-n)-e expression #N, char C:for string scripts,file:line:for file scriptsget_source_index()to ScriptLineProviderGNU testsuite results: 7 → 9 passing (command-endings, comment-n now pass).