397 Commits
Author SHA1 Message Date
oech3 ade4c9c9e8 GnuTests.yml: use preinstalled Rust 2026-10-06 22:19:06 +02:00
nagendramohan 7aa5409c2e diff: compare full -y stdout in the gutter marker test
Per review, assert the exact stdout for both --expand-tabs and the
default tab path instead of a column helper, so the test also pins the
exact tabs/spaces emitted.
2026-10-05 22:19:52 +02:00
nagendramohan 8b9908f231 diff: address review — shorten comments and add -y width tests
Shorten the two long comments per review, and add an integration test in
tests/integration.rs exercising `-y --width=40` in both the default
(expand_tabs: false, tab-padding path) and --expand-tabs modes, asserting
the gutter marker lands at the middle of the gutter.
2026-10-05 22:19:52 +02:00
Nagendra Mohan b245f1a0d3 diff: place -y gutter marker at the middle of the gutter
In side-by-side output the gutter marker was written wherever
process_half_line stopped padding the left half (one column past
sdiff_half_width), not at separator_pos (the middle of the gutter).
Those agree only when the gutter is 3 or 4 columns wide, so the default
--width=130 --tabsize=8 (gutter 3) looked right while other widths/tab
sizes drifted (e.g. --width=40 placed '<' at column 17 instead of 19).

Pad from half_width + 1 up to separator_pos before writing the marker so
it lands at the gutter middle, matching GNU sdiff. format_tabs_and_spaces
is a no-op when already at/past separator_pos, so narrow gutters are
unaffected. Add a regression test at --width=40.

Fixes #269
2026-10-05 22:19:52 +02:00
Sai Asish Y 5cdd3a4d8a diffutils: assert width-like operands are kept as filenames in tests
Signed-off-by: Sai Asish Y <say.apm35@gmail.com>
2026-10-03 13:15:11 -04:00
Sai Asish Y ea7230e412 diffutils: fix panic on non-UTF-8 argument ending in --width=N
Signed-off-by: Sai Asish Y <say.apm35@gmail.com>
2026-10-03 13:15:11 -04:00
renovate[bot] 63a9c4affa chore(deps): update github artifact actions 2026-10-01 13:40:01 +02:00
renovate[bot] 3ba9fbd732 chore(deps): update actions/checkout action to v7 2026-10-01 13:39:08 +02:00
renovate[bot] a870c05370 chore(deps): update dawidd6/action-download-artifact action to v27 2026-09-30 07:20:10 +02:00
renovate[bot] 6020365239 chore(deps): update dawidd6/action-download-artifact action to v26 2026-09-29 07:04:59 +02:00
Sylvestre Ledru e4f12ad57f prepare 0.6.0 2026-09-27 08:14:35 +02:00
renovate[bot] 8ca6b081e5 chore(deps): update dawidd6/action-download-artifact action to v25 2026-09-26 07:17:56 +02:00
Daniel Hofstetter 860f6f4bab Bump getrandom from 0.4.2 to 0.4.3 2026-09-22 17:10:53 +02:00
Daniel Hofstetter f504129212 Bump cargo-dist from 0.30.3 to 0.33.0 2026-09-22 17:10:50 +02:00
renovate[bot] 3f7a9a6ff3 chore(deps): update rust crate rand to v0.10.3 2026-09-20 15:00:40 +02:00
renovate[bot] 0431c34fc9 chore(deps): update rust crate divan to v5.0.2 2026-09-18 07:17:42 +02:00
Daniel Hofstetter 356efa7d19 Bump anyhow from 1.0.102 to 1.0.104 2026-09-09 17:04:54 +02:00
Sylvestre Ledru cbc5298f0d ci: fall back to the gnulib GitHub mirror for tests/init.sh
The savannah gitweb interface is regularly rate-limited or unavailable, so
retry it and then fall back to the official gnulib mirror on GitHub rather
than failing the whole GNU testsuite job.
2026-08-24 22:56:23 +02:00
Sylvestre Ledru 7de61c5e41 ci: make the GNU testsuite run and its PR comment resilient
GnuTests on #262 reported "PASSED: -8 / FAILED: +12" although the branch
changes nothing for the testsuite.
2026-08-24 22:56:23 +02:00
renovate[bot] 3d34e509de chore(deps): update dawidd6/action-download-artifact action to v24 2026-08-21 14:09:36 +02:00
Pablo Garcia 68d0610cab cmp: use checked subtraction for the verbose offset padding
The --verbose branch of format_verbose_difference padded the byte-offset
column with a plain subtraction while the --print-bytes branch above it
already used saturating_sub. offset_width is derived from the smaller
file's metadata length, so a file reporting length 0 that still yields
bytes (/dev/zero) collapses it to 2 and the subtraction underflows once
the offset reaches three digits.

Fixes #265
2026-08-18 08:36:39 +02:00
renovate[bot] 3b68237566 chore(deps): update dawidd6/action-download-artifact action to v23 2026-08-16 10:05:45 +02:00
renovate[bot] 4e8c509948 chore(deps): update codspeedhq/action action to v5 2026-07-29 14:07:40 +02:00
renovate[bot] 04a4022546 chore(deps): update rust crate regex to v1.13.1 2026-07-16 08:22:19 +02:00
Daniel Hofstetter baf250bb36 clippy: fix byte_char_slices lint
https://rust-lang.github.io/rust-clippy/master/index.html#byte_char_slices
2026-07-10 17:47:39 -04:00
Daniel Hofstetter f840fe51af clippy: fix useless_borrows_in_formatting lint
https://rust-lang.github.io/rust-clippy/master/index.html#useless_borrows_in_formatting
2026-07-10 17:47:39 -04:00
Toggy Smith e0540af67c docs(readme): fix example (#260)
This fixes the example in the README to be prefixed with the
utility name.
2026-07-10 23:46:50 +02:00
renovate[bot] 3b893fc621 chore(deps): update rust crate regex to v1.13.0 2026-07-10 08:07:01 +02:00
renovate[bot] 890c3e451c chore(deps): update rust crate rand to v0.10.2 2026-07-02 13:07:35 +02:00
renovate[bot] e4462b038e chore(deps): update rust crate divan to v5.0.1 2026-06-27 11:15:35 +02:00
renovate[bot] 30bbc169ac chore(deps): update actions/cache action to v6 2026-06-24 09:11:15 +02:00
renovate[bot] ff6b8d46a7 chore(deps): update rust crate divan to v5 2026-06-24 07:53:41 +02:00
oech3 dc9ca179f3 cmp: use .map_err 2026-06-10 15:12:36 +02:00
oech3 f29e96cdba cmp.rs: simplify by .ok_or 2026-06-10 10:21:25 +02:00
renovate[bot] a46dae68b1 chore(deps): update rust crate regex to v1.12.4 2026-06-10 07:20:17 +02:00
renovate[bot] 1a8d7f96a6 chore(deps): update codecov/codecov-action action to v7 (#240)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-06-07 09:08:29 +02:00
renovate[bot] 53599ccd40 chore(deps): update rust crate libfuzzer-sys to v0.4.13 2026-06-05 07:24:05 +02:00
renovate[bot] 9bc64f03ed chore(deps): update rust crate chrono to v0.4.45 2026-06-05 07:17:21 +02:00
Marc Herbert d266f9b90e CI: remove echo "/opt/homebrew/opt/gpatch/libexec/gnubin" >> "$GITHUB_PATH" (#234)
This is not needed now that tests automatically look for `gpatch` on mac
since commit 1254f146f8 ("tests: validate "patch" and "ed" commands
once, print meaningful messages (#226)")

The fewer PATH changes, the better.

Signed-off-by: Marc Herbert <Marc.Herbert@gmail.com>
2026-06-03 14:13:10 +02:00
Marc Herbert ec3428b48f tests: fix "gpatch --version" error message on mac (#235)
When we fail to find `gpatch`, don't say that we failed to find `patch`.

Cosmetic fix to commit 1254f146f8 ("tests: validate "patch" and "ed"
commands once, print meaningful messages (#226)")

This is an extremely minor fix because the error message already printed
"gpatch validation failed, no such file or directory" even before this
commit.

Signed-off-by: Marc Herbert <Marc.Herbert@gmail.com>
2026-06-03 14:11:51 +02:00
oech3 58da229c09 support prefixed names (#231) 2026-06-03 14:11:29 +02:00
Sylvestre Ledru 250f935efe Add CONTRIBUTING.md pointing to the review guidelines 2026-05-30 10:07:54 +02:00
Marc Herbert 1254f146f8 tests: validate "patch" and "ed" commands once, print meaningful messages (#226)
macOS' /usr/bin/patch and GNU patch have very subtle incompatibilities
that cause only some "more advanced" tests to fail in obscure and very
time-consuming ways - while other tests pass. In some cases (depending
on test threads racing), the lack of newlines in some test data even
causes the whole test suite to stall.

This fix runs `patch -version` (only once), makes sure the output starts
with "GNU patch" and shows a meaningful assert message when not. It also
looks for `gpatch` instead of `patch` on macOS and shows a meaningful
assert message if either is missing.

Fixes: #225

This also provides faster and better feedback when `ed` is missing (see
#39) and implements a portable and basic check.

Last but not least, this new code is generic enough to support the
validation of any other test dependency in the future.
2026-05-24 17:08:52 +02:00
renovate[bot] c1943c5abb chore(deps): update rust crate divan to v4.7.0 2026-05-23 07:09:07 +02:00
d33aca1fff cmp Feat: change data type for 'bytes' limit and 'ignore initial' to u64 (#183)
* feat: u64 for --bytes and --ignore-initial

fix: bumped up tempfile to "3.26.0"

The variables for --bytes, --ignore-initial and line count where size 'usize',
thus limiting the readable bytes on 32-bit systems.
GNU cmp is compiled with LFS (Large File Support) and allows i64 values.

This is now all u64, which works also on 32-bit systems with Rust.
There is no reason to implement a 32-bit barrier for 32 bit machines.

Additionally the --bytes limit can be set to 'u128' using the feature
"cmp_bytes_limit_128_bit".

The performance impact would be negligible, as there only few calculations
each time a full block is read from the file.


---------

Co-authored-by: Gunter Schmidt <gsgit@beadsoft.de>
Co-authored-by: Sylvestre Ledru <sylvestre@debian.org>
2026-05-14 23:13:02 +02:00
renovate[bot] 649179069c chore(deps): update dawidd6/action-download-artifact action to v21 2026-05-14 10:29:01 +02:00
Daniel Hofstetter 9fe96ed5e9 Make compare_test_results.py executable 2026-05-14 10:25:48 +02:00
pocopepe 2c47ea9f04 feat: add gnu testsuite tracking workflows 2026-05-14 09:42:26 +02:00
Daniel Hofstetter 9a7a727da4 Fix end of some files 2026-05-14 09:41:36 +02:00
Daniel Hofstetter a24b0c391e ci: add .pre-commit-config.yaml 2026-05-14 09:41:36 +02:00