From owner-freebsd-hackers@freebsd.org Sat Feb 15 16:03:04 2020 Return-Path: Delivered-To: freebsd-hackers@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1040223F60F for ; Sat, 15 Feb 2020 16:03:04 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48KZlq6mqrz4Php; Sat, 15 Feb 2020 16:03:03 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from ivaldir.etoilebsd.net (etoilebsd.net [178.32.217.76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: bapt) by smtp.freebsd.org (Postfix) with ESMTPSA id D15CF189AC; Sat, 15 Feb 2020 16:03:03 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: by ivaldir.etoilebsd.net (Postfix, from userid 1001) id DC113E384A; Sat, 15 Feb 2020 17:03:01 +0100 (CET) Date: Sat, 15 Feb 2020 17:03:01 +0100 From: Baptiste Daroussin To: Fehmi Noyan ISI Cc: freebsd-hackers@freebsd.org Subject: Re: diff(1) -c and -u options Message-ID: <20200215160301.ebcr5allppzgbgri@ivaldir.net> References: <83CB71EA-714E-4C91-9E2B-143A0E222D37.ref@yahoo.com> <83CB71EA-714E-4C91-9E2B-143A0E222D37@yahoo.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="quupu7i3q4pq2nt2" Content-Disposition: inline In-Reply-To: <83CB71EA-714E-4C91-9E2B-143A0E222D37@yahoo.com> X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Feb 2020 16:03:04 -0000 --quupu7i3q4pq2nt2 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Feb 15, 2020 at 06:38:03PM +1300, Fehmi Noyan ISI via freebsd-hacke= rs wrote: > Hi, >=20 > 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 un= ified_body()) >=20 > 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)/in= put_c1.in" "$(atf_get_srcdir)/input_c2.in=E2=80=9D >=20 >=20 > 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 passe= d as arguments at the same time. >=20 > I would assume -u -cNUM was used to limit the number of output lines but = the same can be achieved by -uNUM anyway. >=20 > I thought about removing this test case since it does not test anyting re= lated 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 firs= t. >=20 > Any thoughts? Sure go ahead, I am the author of the test suite there. Feel free to ping me if you need. Best regards, Bapt --quupu7i3q4pq2nt2 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEgOTj3suS2urGXVU3Y4mL3PG3PloFAl5IFjMACgkQY4mL3PG3 Plq6+RAAwt+azMaoW/4qV/uXl4D36wvw9VUHlmrLjxuj8mUsD2tbYyX1pedeRgAN 5KXmPoknj+Ag8oQm6Apfsawmhcd7heAc7ZFoxUEpYKVdw88QkEgopiC/13usHMN5 DRprXyDKU2YJ4a2NW4aGIqyWDA5eE7MUNQs5amodJS3Q5IzZ3nDVcAuVIU1V76da H3zy5wpitRDnbnR/5kLD6B4l3H2JbNSO0cepKg5sdutfA/47cDvMjpIcg25WjIeY WTHHqZyDBPZgS/nLznbTgRpoiWRbA9bZQdWIhvoG7Mo/u9+PyEvyM2OmiNtJUqxB PSeTjxjTcqA3aeRFdl5lE9srAJGBCYYfQjquO/Ye5xhNV1DhD8Bd6Q41Tmg531U3 hywCMnOy03k46PubnI0rHllyj8A3sm47iglEMEaYom9OU+EIHLYY3CGNdjbDSCXO fD/wWuUHolD5m09V8leQzqZV0OaOpSgwRO6eQ88T7/PCLwtkRA7wBFWBRzA4giNa 2WOAStYy+N74bEw2Ov8J7JCiYxXAPprUO8ivlbQ2Xde+xWIil8fmN6BjemkWONYf VQNMAaac08g3eBLENrftIPmYZnaXrRighUWNk5CoGcDliuYyxph1ffwZUNFW4gk7 2aPg0x1LfgJuN8f2bAwhpvr2bhBq4pJt/LLf++TudnrzwZeRyUA= =iblR -----END PGP SIGNATURE----- --quupu7i3q4pq2nt2--