History log of /freebsd-14.2/usr.bin/diff/tests/diff_test.sh (Results 1 – 25 of 34)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: release/13.4.0-p5, release/13.5.0-p1, release/14.2.0-p3, release/13.5.0, release/14.2.0-p2, release/14.1.0-p8, release/13.4.0-p4, release/14.1.0-p7, release/14.2.0-p1, release/13.4.0-p3, release/14.2.0, release/13.4.0, release/14.1.0
# 1b7672ed 16-May-2024 Ed Maste <[email protected]>

diff: honour -B flag with -q

PR: 278988
Reviewed by: bapt
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D45220

(cherry picked from commit fb623aab3927a682

diff: honour -B flag with -q

PR: 278988
Reviewed by: bapt
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D45220

(cherry picked from commit fb623aab3927a6825ff7731198ec2e33426f7607)

show more ...


Revision tags: release/13.3.0, release/14.0.0
# d0b2dbfa 16-Aug-2023 Warner Losh <[email protected]>

Remove $FreeBSD$: one-line sh pattern

Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/


Revision tags: release/13.2.0
# 8bf187f3 14-Dec-2022 Kyle Evans <[email protected]>

diff: fix side-by-side output with tabbed input

The previous logic conflated some things... in this block:
- j: input characters rendered so far
- nc: number of characters in the line
- col: columns

diff: fix side-by-side output with tabbed input

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

show more ...


Revision tags: release/12.4.0, release/13.1.0
# efba49ee 19-Apr-2022 Kyle Evans <[email protected]>

diff: tests: loosen up requirements for report_identical

This test cannot run without an unprivileged_user being specified
anyways, so just run as the unprivileged user. Revoking read permisions
wo

diff: tests: loosen up requirements for report_identical

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

show more ...


# adce4585 01-Mar-2022 Li-Wen Hsu <[email protected]>

Revert "Temporarily skip usr.bin.diff.diff_test.functionname in CI"

This reverts commit 85eeb6ea62d45c5df893a16b87969bd7313a3dbb.

The issue has been fixed by 4be7d087c2b566f4910683836be279d55c1a81c

Revert "Temporarily skip usr.bin.diff.diff_test.functionname in CI"

This reverts commit 85eeb6ea62d45c5df893a16b87969bd7313a3dbb.

The issue has been fixed by 4be7d087c2b566f4910683836be279d55c1a81c6.

PR: 262086

show more ...


# 85eeb6ea 21-Feb-2022 Li-Wen Hsu <[email protected]>

Temporarily skip usr.bin.diff.diff_test.functionname in CI

PR: 262086
Sponsored by: The FreeBSD Foundation


# 3931c072 18-Feb-2022 Tom Jones <[email protected]>

diff: fix failed compare when ignoring file case

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 correc

diff: fix failed compare when ignoring file case

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

show more ...


# cffebd1e 18-Feb-2022 Tom Jones <[email protected]>

Remove surplus check for which diff is being tested

Must have left this when I was testing the test invocation for
8f79bd9b85716c495c2741ac25db37e8d71f22f7

Pointy hat: thj
Sponsored by: Klara Inc.


# f4be3645 18-Feb-2022 Tom Jones <[email protected]>

diff: add --no-dereference flag

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 Re

diff: add --no-dereference flag

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

show more ...


# 8f79bd9b 18-Feb-2022 Tom Jones <[email protected]>

diff: Detect Objective-C methods

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 def

diff: Detect Objective-C methods

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

show more ...


Revision tags: release/12.3.0
# 3cbf98e2 22-Aug-2021 Piotr Pawel Stefaniak <[email protected]>

diff: read whole files to determine if they are ASCII text

Before this change, only the first BUFSIZE bytes were checked.

Reviewed by: bapt (previous version)
Differential Revision: https://reviews

diff: read whole files to determine if they are ASCII text

Before this change, only the first BUFSIZE bytes were checked.

Reviewed by: bapt (previous version)
Differential Revision: https://reviews.freebsd.org/D31639

show more ...


# af2f0164 22-Aug-2021 Piotr Pawel Stefaniak <[email protected]>

diff: don't output carriage returns that were stripped on input

--strip-trailing-cr worked as intended for comparison between files,
but the characters were still present in final output.


# 6fa0b289 21-Jun-2021 Mark Johnston <[email protected]>

diff tests: Require root for report_identical

This test switches users and either hangs or fails when run as an
unprivileged user.

MFC after: 1 week
Sponsored by: The FreeBSD Foundation


Revision tags: release/13.0.0
# b67df8d7 03-Feb-2021 Olivier Cochard <[email protected]>

diff: Use unprivileged_user with report_identical test

Approved by: bapt
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D28466


# c440e787 26-Jan-2021 Baptiste Daroussin <[email protected]>

diff: add a test case about the non regular file support


# 13860e71 25-Jan-2021 Baptiste Daroussin <[email protected]>

diff: add a test case for failed -s option


# 12a8d302 09-Jan-2021 Ed Maste <[email protected]>

diff: honour flags with -q

Previously -q (just print a line when files differ) ignored flags like
-w (ignore whitespace). Avoid the D_BRIEF short-circuit when flags are
in effect.

PR: 252515
Repo

diff: honour flags with -q

Previously -q (just print a line when files differ) ignored flags like
-w (ignore whitespace). Avoid the D_BRIEF short-circuit when flags are
in effect.

PR: 252515
Reported by: Scott Aitken
Reviewed by: kevans
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D28064

show more ...


Revision tags: release/12.2.0
# ac05de17 30-Jul-2020 Kyle Evans <[email protected]>

diff: fix side_by_side after r363679

It's currently unclear to me how this could have worked previously; \n here
is not a literal newline but actual '\' 'n', and was getting passed to the
underlying

diff: fix side_by_side after r363679

It's currently unclear to me how this could have worked previously; \n here
is not a literal newline but actual '\' 'n', and was getting passed to the
underlying regex engine as such. regex(3) does not translate this to a
newline, and this became an error because we don't really allow escaping
of arbitrary ordinary characters anymore.

Run the pattern strings through printf to make sure we're dealing with real
newlines before passing them through to atf_check, which ultimately feeds
them directly to regcomp(3).

This fix is different than that will be needed for sed, in that this is the
proper way to inject newlines into search strings as long as regex(3)
won't combine \ + n as folks might expect.

Reported by: Jenkins via lwhsu
MFC after: 1 week

show more ...


Revision tags: release/11.4.0
# 2816b999 01-Jun-2020 Baptiste Daroussin <[email protected]>

diff: restore compatibility with GNU diff regarding -N option

When -N is used the missing files are treated as empty.

PR: 233402
Submitted by: Fehmi Noyan Isi <[email protected]>
Reported by: Ro

diff: restore compatibility with GNU diff regarding -N option

When -N is used the missing files are treated as empty.

PR: 233402
Submitted by: Fehmi Noyan Isi <[email protected]>
Reported by: Roman Neuhauser <[email protected]>
MFC after: 3 days
Differential Revision: D25081

show more ...


# f096ed98 01-Jun-2020 Baptiste Daroussin <[email protected]>

Restore compatibility with GNU diff regarding --label

Various options to "diff(1)" show filenames, and traditionally make use of the
"--label" parameter, if set.

Restore this behaviour in BSD diff.

Restore compatibility with GNU diff regarding --label

Various options to "diff(1)" show filenames, and traditionally make use of the
"--label" parameter, if set.

Restore this behaviour in BSD diff.

While here add a regression test

PR: 244533
Submitted by: Jamie Landeg-Jones <[email protected]>
MFC after: 3 days

show more ...


# 67c90765 28-Apr-2020 Kyle Evans <[email protected]>

diff(1): don't reject specifying the same format multiple times

This may happen, for instance, if one happens to have an alias of diff to
diff -up and attempts to specify the amount of context on to

diff(1): don't reject specifying the same format multiple times

This may happen, for instance, if one happens to have an alias of diff to
diff -up and attempts to specify the amount of context on top of that.

Aliases like this may cause other problems, but if they're really not ever
generating non-unified diffs then we should at least not break that
use-case.

In addition, we'll now pick up a format mismatch if -p is specified with
!contextual && !unified && !unset.

Fix up a small trailing whitespace nit in the tests while we're here, and
add tests to make sure that we can double up all the formatting options.

Reported by: jbeich
MFC after: 3 days

show more ...


# db9cccfb 20-Apr-2020 Kyle Evans <[email protected]>

diff(1): reject conflicting formatting options

This matches GNU diff(1) behavior and, more importantly, eliminates any
source of confusion if multiple formatting options are specified.

Note that th

diff(1): reject conflicting formatting options

This matches GNU diff(1) behavior and, more importantly, eliminates any
source of confusion if multiple formatting options are specified.

Note that the committed diff differs slightly from the submitted: I've
modified it so that we initialize diff_format to something that isn't an
accepted format option so that we can also reject --normal -c and -c
--normal, which would've otherwise been accepted because the default was
--normal. After option parsing we default it to D_NORMAL if it's still
unset.

PR: 243975
Submitted by: fehmi noyan isi
MFC after: 1 week

show more ...


# 43fbd654 13-Feb-2020 Kyle Evans <[email protected]>

diff: fix segfault with --tabsize and no/malformed argument

--tabsize was previously listed as optional_argument, but didn't account for
the optionality of it in the argument handling. This is irrel

diff: fix segfault with --tabsize and no/malformed argument

--tabsize was previously listed as optional_argument, but didn't account for
the optionality of it in the argument handling. This is irrelevant -- the
manpage doesn't indicate that the argument is optional, and indeed there's
no clear interpretation of omitting the argument because there's no other
side effect of --tabsize.

The "malformed" argument part of the header on this message is simply
referring to usage like this:

% diff --tabsize 4 A B

With an optional_argument, the argument must be attached to the parameter
directly (e.g. --tabsize=4), so the argument is effectively NULL with the
above invocation as if no argument had been passed.

PR: 243974
Submitted by: fehmi noyan isi <fnoyanisi yahoo com> (diff.c portion)
MFC after: 3 days

show more ...


# 64793e74 07-Feb-2020 Baptiste Daroussin <[email protected]>

diff: implement -y (--side-by-side) along with -W and --suppress-common-lines

PR: 219933
Submitted by: fehmi noyan isi <[email protected]>
MFC after: 3 weeks


Revision tags: release/12.1.0, release/11.3.0, release/12.0.0
# e68edb8c 19-Aug-2018 Kyle Evans <[email protected]>

diff(1): Implement -B/--ignore-blank-lines

As noted by cem in r338035, coccinelle invokes diff(1) with the -B flag.
This was not previously implemented here, so one was forced to create a link
for G

diff(1): Implement -B/--ignore-blank-lines

As noted by cem in r338035, coccinelle invokes diff(1) with the -B flag.
This was not previously implemented here, so one was forced to create a link
for GNU diff to /usr/local/bin/diff

Implement the -B flag and add some primitive tests for it. It is implemented
in the same fashion that -I is implemented; each chunk's lines are scanned,
and if a non-blank line is encountered then the chunk will be output.
Otherwise, it's skipped.

MFC after: 2 weeks

show more ...


12