Conversation
|
GNU sed testsuite comparison: |
|
Please fix the failing tests, ensuring the output is compatible with existing sed output. Also ensure and test that the behavior is correct under Probably best to wait for the integration of this PR and then add the code in the following block. if index == 0 || context.separate {
context.line_number = 0;
reset_latched_address_ranges(&mut context.range_commands);
} |
|
Yes, I'll get back on this when the PR is accepted. |
|
@LoukasPap merged! |
|
@sylvestre Thanks for the update! I'll look at it. |
|
Hello and sorry for the inactivity these days. I am trying to install act so as to run CI checks locally, but I am facing issues with the installation. The problem is in my OS (Windows) where something is not working correctly. I am trying to find a solution to that. I will update you as soon as I start working on the issue again. Thank you for your patience! |
|
@LoukasPap Consider focusing on the test failures, not to replicate the entire CI. |
|
@dspinellis I had tried running some tests alone but I was getting different error messages from the ones in the CI console. For example |
|
Ensure your files don't contain carriage returns (\r). Consider installing WSL and trying the tests there. |
|
I have WSL. I'll try there. |
|
could you please add a test to cover this? thanks |
|
Yes, I'll add today. |
|
Moved to WSL and the tests are showing the correct error messages! I've added a test case and now I will try to fix the failing tests before pushing. |
|
Finally corrected the problem with the newline. I also fixed a same-case problem with |
|
@LoukasPap Please squash related commits together. So each commit should address one case. |
09805a5 to
15e16b8
Compare
|
Just checked with |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #263 +/- ##
==========================================
- Coverage 82.07% 81.95% -0.13%
==========================================
Files 13 13
Lines 5445 5453 +8
Branches 293 296 +3
==========================================
Hits 4469 4469
- Misses 974 982 +8
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:
|
|
Fixed |
|
Hello! I resolved conflicts with main branch. Is this OK to merge? (I see we don't have unit tests to cover processor.rs so I didn't add any). |
dspinellis
left a comment
There was a problem hiding this comment.
Almost there! Please see the one comment and squash the commits into one rebased atop main.
| // Reset hold space for separate file processing | ||
| if index > 0 && context.separate { | ||
| context.hold.content.clear(); | ||
| context.hold.has_newline = false; |
There was a problem hiding this comment.
Could there two lines be merged to the body of the condition above?
There was a problem hiding this comment.
Of course:
if index == 0 || context.separate {
context.line_number = 0;
reset_latched_address_ranges(&mut context.range_commands);
if index > 0 {
context.hold.content.clear();
context.hold.has_newline = false;
}
}There was a problem hiding this comment.
Assuming that index will never be negative, we can remove the index > 0 condition. Deleting this inner condition doesn't affect any passing test.
- If hold space is empty, `x` and `g` replace the pattern with a newline and `G` first appends and then replaces with a newline.
Fix issue 253
--separateThe solution fixes the problem for the swap
xcommand but also for replacegand append-replaceGcommands.