Skip to content

Conversation

@twaugh
Copy link
Owner

@twaugh twaugh commented Oct 18, 2025

More tests for lsdiff and grepdiff. The original implementations pass but the new scanner-based ones need work.

Also included a Makefile fix for the symlinks when switching back and forth between implementations.

Add six new test cases for grepdiff features that were previously
untested:

- grepdiff-number-files: Test -N/--number-files option
- grepdiff-status: Test -s/--status option
- grepdiff-include-exclude: Test -i/--include and -x/--exclude options
- grepdiff-file-regex: Test -f/--file option
- grepdiff-annotate: Test --annotate option
- grepdiff-with-filename: Test -H/--with-filename and -h/--no-filename

All tests pass with the traditional filterdiff.c implementation.

With scanner-based patchfilter (--enable-scanner-patchfilter), four
tests pass and two are marked as XFAIL since those features are not
yet implemented in the scanner-based grepdiff:
- grepdiff-status (no -s option)
- grepdiff-annotate (no --annotate option)

Assisted-by: Claude Code
@codecov
Copy link

codecov bot commented Oct 18, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 86.41%. Comparing base (1c58342) to head (d53d1ab).
⚠️ Report is 3 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #148      +/-   ##
==========================================
+ Coverage   85.78%   86.41%   +0.62%     
==========================================
  Files          15       15              
  Lines        8112     8112              
  Branches     1620     1622       +2     
==========================================
+ Hits         6959     7010      +51     
+ Misses       1153     1102      -51     
Flag Coverage Δ
unittests 86.41% <ø> (+0.62%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@twaugh twaugh changed the title Add grepdiff tests for missing features Add tests for missing features in scanner-based implementations Oct 18, 2025
Add five new test cases for lsdiff features that were previously
untested:

- lsdiff-number-files: Test -N/--number-files option
- lsdiff-files-range: Test -F/--files=RANGE option
- lsdiff-empty-files-removed: Test -E/--empty-files-as-removed option
- lsdiff-addprefix: Test --addprefix option
- lsdiff-strip-match: Test -p/--strip-match option

All tests pass with the traditional filterdiff.c implementation.

With scanner-based patchfilter (--enable-scanner-patchfilter), four
tests pass (number-files, files-range, empty-files-removed, addprefix)
and one is marked as XFAIL since that feature is not yet implemented
in scanner-based lsdiff (strip-match).

Assisted-by: Claude Code
Use all-local hook to ensure lsdiff and grepdiff symlinks are built
during 'make', so they correctly point to filterdiff or patchfilter
depending on the configuration.

Previously, after reconfiguring between implementations, running 'make'
would not update the symlinks, leaving them pointing to the wrong target.

Also ensure the patchview directory exists before creating symlinks in it,
which fixes 'make distcheck'.

Assisted-by: Claude Code
@twaugh twaugh merged commit 754b4a5 into master Oct 18, 2025
8 checks passed
@twaugh twaugh deleted the grepdiff-tests branch October 18, 2025 09:56
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.

2 participants