Comments (9)
@calixteman has been looking into it :)
from diffutils.
The ed_diff
tests fail because ed
is not installed. I opened a separate ticket for it as it is not a Windows-only issue.
from diffutils.
The failures look very similar to the error described in https://gnuwin32.sourceforge.net/packages/patch.htm#install:
On MS-Windows, the patchfile must be a text file, i.e. CR-LF must be used as line endings. A file with LF may give the error: "Assertion failed, hunk, file patch.c, line 343," unless the option '--binary' is given.
from diffutils.
I ran some tests in a windows VM, and I can confirm that diff.exe uses CR-LF (\r\n) as line endings.
Our implementation mostly uses the writeln macro, the documentation of which explicitly states:
On all platforms, the newline is the LINE FEED character (\n/U+000A) alone (no additional CARRIAGE RETURN (\r/U+000D).
from diffutils.
According to actions/runner-images#5459 (comment), and seeing the contents of stderr in our failures, the patch.exe
binary that gets used is from Strawberry Perl, and it is probably not what we want.
The Git for Windows installer installs recent versions of the diffutils tools in C:\Program Files\Git\usr\bin\
.
from diffutils.
#57 makes 13 failures (out of 16) go away.
from diffutils.
I fixed the remaining test failures in #58.
The problem wasn't with line endings, after all.
That doesn't mean we shouldn't look into line ending differences on Windows (see #42), but it should be tracked in a separate issue.
from diffutils.
That doesn't mean we shouldn't look into line ending differences on Windows (see #42), but it should be tracked in a separate issue.
I ran some tests on Windows. With the very old build of diffutils distributed by the Gnuwin32 project (version 2.8.7, 20 years old!), diff.exe
rewrites all line endings to \r\n
, even content lines that ended with \n
only. However with a more recent build distributed in the Git for Windows installer (version 3.10), the rewrite doesn't happen any longer, and diff.exe
behaves like on Unix, i.e. it defaults to \n
for line endings (and content lines ending with \r\n
are preserved). This might be due to a build-time option or the build environment, but regardless, our implementation isn't completely inconsistent with what's out there, so I don't think this warrants a separate issue, and perhaps #42 can be abandoned?
from diffutils.
yeah, sounds good, thanks
from diffutils.
Related Issues (20)
- `cmp` command is not implemented
- `diff3` command is not implemented
- `sdiff` command is not implemented
- Exit codes for `diff` command don't match GNU implementation
- `-q`/`--brief` option is not implemented
- ed format: when range of lines is a single line, the format differs from upstream
- `-s`/`--report-identical-files` option is not implemented
- `-t`/`--expand-tabs` option is not implemented
- `--tabsize=NUM` option is not implemented
- Context diff doesn't display the last modification timestamp HOT 2
- running ./tests/run-upstream-testsuite.sh fails with `line 95: cd: gt-basic.*: No such file or directory` HOT 11
- Some tests require `ed` and fail if it is not installed HOT 1
- Code coverage in CI gets cancelled HOT 1
- Typo in "About" box HOT 3
- When "-" is used for standard input, the filename in the context/unified headers should be "-", not "/dev/stdin"
- Uploading reports to codecov.io fails HOT 4
- Running the fuzzers in CI error out
- Integration test (cannot_read_files) fails when there is a file named "foo.txt" in working directory
- Just like with rust/coreutils, compare with the GNU implementation and highlight improvements and regressions
- Regression: unit tests fail in CI on MacOS HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from diffutils.