<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/usr.bin/diff/tests/diff_test.sh, branch releng/14.0</title>
<subtitle>FreeBSD source tree</subtitle>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/'/>
<entry>
<title>Remove $FreeBSD$: one-line sh pattern</title>
<updated>2023-08-16T17:55:03+00:00</updated>
<author>
<name>Warner Losh</name>
<email>imp@FreeBSD.org</email>
</author>
<published>2023-08-16T17:55:03+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=d0b2dbfa0ecf2bbc9709efc5e20baf8e4b44bbbf'/>
<id>d0b2dbfa0ecf2bbc9709efc5e20baf8e4b44bbbf</id>
<content type='text'>
Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/
</pre>
</div>
</content>
</entry>
<entry>
<title>diff: fix side-by-side output with tabbed input</title>
<updated>2022-12-14T01:31:21+00:00</updated>
<author>
<name>Kyle Evans</name>
<email>kevans@FreeBSD.org</email>
</author>
<published>2022-12-14T01:31:21+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=8bf187f35b6298b7848c5ecf45b0b714327090d9'/>
<id>8bf187f35b6298b7848c5ecf45b0b714327090d9</id>
<content type='text'>
The previous logic conflated some things... in this block:
- j: input characters rendered so far
- nc: number of characters in the line
- col: columns rendered so far
- hw: column width ((h)ard (w)idth?)

Comparing j to hw or col to nc are naturally wrong, as col and hw are
limits on their respective counters and nc is already brought down to hw
if the input line should be truncated to start with.

Right now, we end up easily truncating lines with tabs in them as we
count each tab for $tabwidth lines in the input line, but we really
should only be accounting for them in the column count.  The problem is
most easily demonstrated by the two input files added for the tests,
the two tabbed lines lose at least a word or two even though there's
plenty of space left in the row for each side.

Reviewed by:	bapt, pstef
Sponsored by:	Klara, Inc.
Differential Revision:	https://reviews.freebsd.org/D37676
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The previous logic conflated some things... in this block:
- j: input characters rendered so far
- nc: number of characters in the line
- col: columns rendered so far
- hw: column width ((h)ard (w)idth?)

Comparing j to hw or col to nc are naturally wrong, as col and hw are
limits on their respective counters and nc is already brought down to hw
if the input line should be truncated to start with.

Right now, we end up easily truncating lines with tabs in them as we
count each tab for $tabwidth lines in the input line, but we really
should only be accounting for them in the column count.  The problem is
most easily demonstrated by the two input files added for the tests,
the two tabbed lines lose at least a word or two even though there's
plenty of space left in the row for each side.

Reviewed by:	bapt, pstef
Sponsored by:	Klara, Inc.
Differential Revision:	https://reviews.freebsd.org/D37676
</pre>
</div>
</content>
</entry>
<entry>
<title>diff: tests: loosen up requirements for report_identical</title>
<updated>2022-04-19T04:04:13+00:00</updated>
<author>
<name>Kyle Evans</name>
<email>kevans@FreeBSD.org</email>
</author>
<published>2022-04-19T04:04:13+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=efba49ee5a64f8f56f49e58887484284d785d542'/>
<id>efba49ee5a64f8f56f49e58887484284d785d542</id>
<content type='text'>
This test cannot run without an unprivileged_user being specified
anyways, so just run as the unprivileged user.  Revoking read permisions
works just as well if you're guaranteed non-root.

Reviewed by:	pstef
Sponsored by:	Klara, Inc.
Differential Revision:	https://reviews.freebsd.org/D34950
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This test cannot run without an unprivileged_user being specified
anyways, so just run as the unprivileged user.  Revoking read permisions
works just as well if you're guaranteed non-root.

Reviewed by:	pstef
Sponsored by:	Klara, Inc.
Differential Revision:	https://reviews.freebsd.org/D34950
</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "Temporarily skip usr.bin.diff.diff_test.functionname in CI"</title>
<updated>2022-03-01T21:37:25+00:00</updated>
<author>
<name>Li-Wen Hsu</name>
<email>lwhsu@FreeBSD.org</email>
</author>
<published>2022-03-01T21:37:25+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=adce4585ca56638801d12790c8f7fcb30e7408d0'/>
<id>adce4585ca56638801d12790c8f7fcb30e7408d0</id>
<content type='text'>
This reverts commit 85eeb6ea62d45c5df893a16b87969bd7313a3dbb.

The issue has been fixed by 4be7d087c2b566f4910683836be279d55c1a81c6.

PR:		262086
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit 85eeb6ea62d45c5df893a16b87969bd7313a3dbb.

The issue has been fixed by 4be7d087c2b566f4910683836be279d55c1a81c6.

PR:		262086
</pre>
</div>
</content>
</entry>
<entry>
<title>Temporarily skip usr.bin.diff.diff_test.functionname in CI</title>
<updated>2022-02-21T08:31:43+00:00</updated>
<author>
<name>Li-Wen Hsu</name>
<email>lwhsu@FreeBSD.org</email>
</author>
<published>2022-02-21T08:31:43+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=85eeb6ea62d45c5df893a16b87969bd7313a3dbb'/>
<id>85eeb6ea62d45c5df893a16b87969bd7313a3dbb</id>
<content type='text'>
PR:		262086
Sponsored by:	The FreeBSD Foundation
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
PR:		262086
Sponsored by:	The FreeBSD Foundation
</pre>
</div>
</content>
</entry>
<entry>
<title>diff: fix failed compare when ignoring file case</title>
<updated>2022-02-18T15:51:38+00:00</updated>
<author>
<name>Tom Jones</name>
<email>thj@FreeBSD.org</email>
</author>
<published>2022-02-18T15:21:23+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=3931c072c63d5a51d83157009e7f7510e08da80c'/>
<id>3931c072c63d5a51d83157009e7f7510e08da80c</id>
<content type='text'>
With --ignore-file-name-case we need to compare files regardless of
case. We need to propigate both names down to diffit so we can look up
the correct file when the names differ based on case, otherwise we try
to look up the file using the case from the a tree which might not be
discoverable if its case is different in the b tree.

Reviewed by:	bapt
Sponsored by:	Klara Inc.
Differential Revision:	https://reviews.freebsd.org/D34201
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
With --ignore-file-name-case we need to compare files regardless of
case. We need to propigate both names down to diffit so we can look up
the correct file when the names differ based on case, otherwise we try
to look up the file using the case from the a tree which might not be
discoverable if its case is different in the b tree.

Reviewed by:	bapt
Sponsored by:	Klara Inc.
Differential Revision:	https://reviews.freebsd.org/D34201
</pre>
</div>
</content>
</entry>
<entry>
<title>Remove surplus check for which diff is being tested</title>
<updated>2022-02-18T15:47:46+00:00</updated>
<author>
<name>Tom Jones</name>
<email>thj@FreeBSD.org</email>
</author>
<published>2022-02-18T15:47:46+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=cffebd1e8fed3fb21b98a2ad6ed910a76b20b177'/>
<id>cffebd1e8fed3fb21b98a2ad6ed910a76b20b177</id>
<content type='text'>
Must have left this when I was testing the test invocation for
8f79bd9b85716c495c2741ac25db37e8d71f22f7

Pointy hat:	thj
Sponsored by:	Klara Inc.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Must have left this when I was testing the test invocation for
8f79bd9b85716c495c2741ac25db37e8d71f22f7

Pointy hat:	thj
Sponsored by:	Klara Inc.
</pre>
</div>
</content>
</entry>
<entry>
<title>diff: add --no-dereference flag</title>
<updated>2022-02-18T15:17:13+00:00</updated>
<author>
<name>Tom Jones</name>
<email>thj@FreeBSD.org</email>
</author>
<published>2022-02-18T15:13:13+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=f4be3645a14d4faa5a51846054318ccf77c9cd5e'/>
<id>f4be3645a14d4faa5a51846054318ccf77c9cd5e</id>
<content type='text'>
When diffing files and directories, don't follow symbolic links, instead
compare where the links point to.

Reviewed by:	bapt
Sponsored by:	Klara Inc.
Differential Revision:	https://reviews.freebsd.org/D34203
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When diffing files and directories, don't follow symbolic links, instead
compare where the links point to.

Reviewed by:	bapt
Sponsored by:	Klara Inc.
Differential Revision:	https://reviews.freebsd.org/D34203
</pre>
</div>
</content>
</entry>
<entry>
<title>diff: Detect Objective-C methods</title>
<updated>2022-02-18T15:09:57+00:00</updated>
<author>
<name>Tom Jones</name>
<email>thj@FreeBSD.org</email>
</author>
<published>2022-02-18T15:07:52+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=8f79bd9b85716c495c2741ac25db37e8d71f22f7'/>
<id>8f79bd9b85716c495c2741ac25db37e8d71f22f7</id>
<content type='text'>
When searching back for function definitions, consider lines starting
with '+' and '-', this allows us to pick up Objective-C methods as well
as C style function definitions.

Reviewed by:	bapt
Sponsored by:	Klara Inc.
Differential Revision:	https://reviews.freebsd.org/D34202
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When searching back for function definitions, consider lines starting
with '+' and '-', this allows us to pick up Objective-C methods as well
as C style function definitions.

Reviewed by:	bapt
Sponsored by:	Klara Inc.
Differential Revision:	https://reviews.freebsd.org/D34202
</pre>
</div>
</content>
</entry>
<entry>
<title>diff: read whole files to determine if they are ASCII text</title>
<updated>2021-08-23T14:09:05+00:00</updated>
<author>
<name>Piotr Pawel Stefaniak</name>
<email>pstef@FreeBSD.org</email>
</author>
<published>2021-08-22T19:57:13+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=3cbf98e2bee91db9ed9118ff557e02cdd449f49a'/>
<id>3cbf98e2bee91db9ed9118ff557e02cdd449f49a</id>
<content type='text'>
Before this change, only the first BUFSIZE bytes were checked.

Reviewed by:	bapt (previous version)
Differential Revision:	https://reviews.freebsd.org/D31639
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Before this change, only the first BUFSIZE bytes were checked.

Reviewed by:	bapt (previous version)
Differential Revision:	https://reviews.freebsd.org/D31639
</pre>
</div>
</content>
</entry>
</feed>
