Skip to content

Conversation

Qelxiros
Copy link
Contributor

@Qelxiros Qelxiros commented May 8, 2025

closes #7126

BufRead::lines is inherently lossy in that it is impossible to know whether a line ended due to a newline or EOF. In this PR, I replaced it with a custom iterator using BufRead::read_until to keep track of the line endings manually.

Copy link

github-actions bot commented May 8, 2025

GNU testsuite comparison:

Skipping an intermittent issue tests/misc/tee (passes in this run but fails in the 'main' branch)

@Qelxiros Qelxiros force-pushed the 7126-csplit-newline branch from bcd7dda to d782cc4 Compare May 8, 2025 02:17
Copy link

github-actions bot commented May 8, 2025

GNU testsuite comparison:

Skip an intermittent issue tests/timeout/timeout (fails in this run but passes in the 'main' branch)

Copy link

github-actions bot commented May 8, 2025

GNU testsuite comparison:

Skip an intermittent issue tests/misc/stdbuf (fails in this run but passes in the 'main' branch)
Skipping an intermittent issue tests/misc/tee (passes in this run but fails in the 'main' branch)

Copy link

github-actions bot commented May 8, 2025

GNU testsuite comparison:

Skipping an intermittent issue tests/misc/tee (passes in this run but fails in the 'main' branch)

@Qelxiros Qelxiros requested a review from cakebaker May 9, 2025 00:07
@cakebaker cakebaker merged commit a752f73 into uutils:main May 9, 2025
70 checks passed
@cakebaker
Copy link
Contributor

Thanks!

RenjiSann pushed a commit to RenjiSann/coreutils that referenced this pull request May 23, 2025
…7901)

* csplit: don't add a newline if the file doesn't end with one

* refactor test

* refactor
nickorlow pushed a commit to nickorlow/coreutils that referenced this pull request Jul 17, 2025
…7901)

* csplit: don't add a newline if the file doesn't end with one

* refactor test

* refactor
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.

csplit: new line added automatically leads to inconsistency with GNU
2 participants