diff(1) -c and -u options
Fehmi Noyan ISI
fnoyanisi at yahoo.com
Sat Feb 15 05:38:17 UTC 2020
Hi,
I am working on same changes to diff(1) (bug 243975) and noticed that one of the atf tests does this (in /usr/src/usr.bin/diff/tests/diff_test.sh unified_body())
atf_check -o file:$(atf_get_srcdir)/unified_c9999.out -s eq:1 \
diff -u -c9999 -L input_c1.in -L input_c2.in "$(atf_get_srcdir)/input_c1.in" "$(atf_get_srcdir)/input_c2.in”
when I try it out myself, -u -cNUM and -cNUM give the same output, making -u redundant here.
GNU diff complains about incompatible output styling when -u -c are passed as arguments at the same time.
I would assume -u -cNUM was used to limit the number of output lines but the same can be achieved by -uNUM anyway.
I thought about removing this test case since it does not test anyting related to unified output (-u) (? here) but did not feel comfortable about it and though it would be worthwhile to send an email to freebsd-hackers first.
Any thoughts?
Ta
Fehmi
More information about the freebsd-hackers
mailing list