From nobody Sun Mar 22 08:05:53 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fdplQ1301z6W9S9 for ; Sun, 22 Mar 2026 08:05:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fdplP5hTFz3Z27 for ; Sun, 22 Mar 2026 08:05:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1774166753; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LZVucrf3rA1imnKFyojqArW4rwazMt0xz+h+H+/cLjk=; b=jz0SBMaeWbbzN2Ic2jtVzlTJH/YpeXxQR4jxNIna/30gWAhkRPScsWnndv0bKNYRNiYyaT pqa3ki3EghI4F8yDGpE/4OIcRWSkS2hVmXJAcc+2QXmRbEyUjnkQ9oCNXpEljG0j4euWiR WCjowofqltN9TPMCgI/U3o6ojHtTOwGdA6LvzPj9joUDJsdBk7QDskGsVbT+3ikY2/YBmH IZ0ho02JyOn+B3Z8OApTebgSOAlk1LgosYfOudwFOzCpJzCfP+4m3C0XRRNK6ewtGXITpM 6bJAwiBWurjNYMzlej2F1z19/aANDkX1zA1YJE4E62HkPGRP+Y28G/gTmXGerw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1774166753; a=rsa-sha256; cv=none; b=BrgrtuUvHFgaf3HacmEGfU9R4ipv9srWGDZ7Lad4hm8Rq4sn6luDZ5RLew7vU5mqWKilaf Dm+9qTJgG4sGCY6cYUUzuIjfxYSLWg6QauiFvNLdRleNLysHozECfxDImmRW0bNVvUoK8R Hqv/46aZZoY9WuJmQpNFyk0piECSohAqoXOEx2nxoYLS14AvuXGegd96OwNOsh3KOC6MwM hT7S3UQ/YhLRjU6K/orRah0iMw6Z2O6Hn9qYdYPZLEggpSqsRsaP3XSfQJeynBod1rVk1E CjW5ajZVPzG5fU6JH3UF2b5k2/yv870M0sRIQeOCxNeaTrPG+PGIOHuOFuYVSw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1774166753; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LZVucrf3rA1imnKFyojqArW4rwazMt0xz+h+H+/cLjk=; b=psrVo8iBnP3MKs6tVE6MG8wScdiIP3UiKfIwBNRL9ACqyTtHoSsFEb7thLGRhV5Ylf/rKr 16tvJTdzzftg7ohnftv4M/drplDyRavAFKafyajqSILdc4FQdhq3kGCu3+xPS9UyGR4cLU +n40wzYhaWw5PpCEKceLLQAE6xL39xBEr6g5DLfl7TNwH/dUUp57aOay7ImR6QtQtsx8FX NrogFgEEGsr4OEh6u6+cxnhUaHDsK2LbH84fM5y43Q9zzV7sw8HPfFm+Dr7y2PjmBUAxTc 49blSSbRRw5KszwSOnDOsiDG24mbmueUNjGf7hu3l7ObhthsCwg6I4JaSFwcrA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fdplP5DmQzqyN for ; Sun, 22 Mar 2026 08:05:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 19152 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sun, 22 Mar 2026 08:05:53 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Baptiste Daroussin From: Dag-Erling=?utf-8?Q? Sm=C3=B8rg?=rav Subject: git: a6f17dd2430b - stable/15 - diff3: fix merge mode List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: a6f17dd2430b92b88a98f10ed35936e7e80f636b Auto-Submitted: auto-generated Date: Sun, 22 Mar 2026 08:05:53 +0000 Message-Id: <69bfa2e1.19152.e70e0ab@gitrepo.freebsd.org> The branch stable/15 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=a6f17dd2430b92b88a98f10ed35936e7e80f636b commit a6f17dd2430b92b88a98f10ed35936e7e80f636b Author: Baptiste Daroussin AuthorDate: 2026-02-13 16:10:44 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2026-03-22 02:04:58 +0000 diff3: fix merge mode Make the merge mode compatible with GNU diff3 Add tests for all the changes, those tests are extracted from the etcupdate testsuite. This version passes the etcupdate testsuite and the diffutils diff3 test suite. MFC After: 1 week (cherry picked from commit 2cfca8e710f260b8a1bb1ee5e1836a52e468ef4b) --- usr.bin/diff3/diff3.c | 51 ++++++++++++++++++------------------ usr.bin/diff3/tests/Makefile | 16 ++++++++++- usr.bin/diff3/tests/conflict1.txt | 5 ++++ usr.bin/diff3/tests/conflict2.txt | 9 +++++++ usr.bin/diff3/tests/conflict3.txt | 5 ++++ usr.bin/diff3/tests/diff3_test.sh | 45 ++++++++++++++++++++++++++++--- usr.bin/diff3/tests/passwd-Em.out | 16 +++++++++++ usr.bin/diff3/tests/passwd-new.txt | 12 +++++++++ usr.bin/diff3/tests/passwd-old.txt | 11 ++++++++ usr.bin/diff3/tests/passwd-test.txt | 15 +++++++++++ usr.bin/diff3/tests/simple-Em.out | 3 +++ usr.bin/diff3/tests/simple-merge.out | 3 +++ usr.bin/diff3/tests/simple1.txt | 2 ++ usr.bin/diff3/tests/simple2.txt | 2 ++ usr.bin/diff3/tests/simple3.txt | 3 +++ 15 files changed, 168 insertions(+), 30 deletions(-) diff --git a/usr.bin/diff3/diff3.c b/usr.bin/diff3/diff3.c index 4f3239b10625..9a01951e60ab 100644 --- a/usr.bin/diff3/diff3.c +++ b/usr.bin/diff3/diff3.c @@ -150,7 +150,7 @@ static void repos(int); static void separate(const char *); static void edscript(int) __dead2; static void Ascript(int) __dead2; -static void mergescript(int) __dead2; +static void mergescript(int, int) __dead2; static void increase(void); static void usage(void); static void printrange(FILE *, struct range *); @@ -361,12 +361,13 @@ merge(int m1, int m2) { struct diff *d1, *d2, *d3; int j, t1, t2; + int f1f3delta; bool dup = false; d1 = d13; d2 = d23; j = 0; - int f1f3delta = 0; + f1f3delta = 0; for (;;) { t1 = (d1 < d13 + m1); @@ -382,6 +383,12 @@ merge(int m1, int m2) change(1, &d1->old, false); keep(2, &d1->new); change(3, &d1->new, false); + } else if (mflag) { + j++; + de[j].type = DIFF_TYPE1; + de[j].old = d1->old; + de[j].new = d1->new; + overlap[j] = 0; } else if (eflag == EFLAG_OVERLAP) { j = edit(d2, dup, j, DIFF_TYPE1); } @@ -437,6 +444,14 @@ merge(int m1, int m2) change(2, &d2->old, false); d3 = d1->old.to > d1->old.from ? d1 : d2; change(3, &d3->new, false); + } else if (mflag) { + j++; + de[j].type = DIFF_TYPE3; + de[j].old = d1->old; + de[j].new = d1->new; + overlap[j] = !dup; + if (!dup) + overlapcnt++; } else { j = edit(d1, dup, j, DIFF_TYPE3); } @@ -468,7 +483,7 @@ merge(int m1, int m2) } if (mflag) - mergescript(j); + mergescript(j, f1f3delta); else if (Aflag) Ascript(j); else if (eflag) @@ -701,7 +716,7 @@ edscript(int n) if (iflag) printf("w\nq\n"); - exit(eflag == EFLAG_NONE ? overlapcnt : 0); + exit(oflag ? overlapcnt > 0 : 0); } /* @@ -795,11 +810,10 @@ Ascript(int n) * inbetween lines. */ static void -mergescript(int i) +mergescript(int i, int f1f3delta) { struct range r, *new, *old; int n; - bool delete = false; r.from = 1; r.to = 1; @@ -812,13 +826,9 @@ mergescript(int i) * Print any lines leading up to here. If we are merging don't * print deleted ranges. */ - delete = (new->from == new->to); - if (de[n].type == DIFF_TYPE1 && delete) - r.to = new->from - 1; - else if (de[n].type == DIFF_TYPE3 && (old->from == old->to)) { - r.from = old->from - 1; - r.to = new->from; - } else if (de[n].type == DIFF_TYPE2) + if (de[n].type == DIFF_TYPE1) + r.to = old->to; + else if (de[n].type == DIFF_TYPE2) r.to = new->from + de_delta[n]; else r.to = old->from; @@ -826,9 +836,7 @@ mergescript(int i) printrange(fp[0], &r); switch (de[n].type) { case DIFF_TYPE1: - /* If this isn't a delete print it */ - if (!delete) - printrange(fp[2], new); + /* Content included in "between" printing from fp[0] */ break; case DIFF_TYPE2: printf("%s %s\n", oldmark, f2mark); @@ -870,8 +878,6 @@ mergescript(int i) if (de[n].type == DIFF_TYPE2) r.from = new->to + de_delta[n]; - else if (old->from == old->to) - r.from = new->to; else r.from = old->to; } @@ -879,18 +885,11 @@ mergescript(int i) /* * Print from the final range to the end of 'myfile'. Any deletions or * additions to this file should have been handled by now. - * - * If the ranges are the same we need to rewind a line. - * If the new range is 0 length (from == to), we need to use the new - * range. */ new = &de[n-1].new; old = &de[n-1].old; - if (old->from == new->from && old->to == new->to) - r.from--; - else if (new->from == new->to) - r.from = new->from; + r.from -= f1f3delta; r.to = INT_MAX; printrange(fp[2], &r); diff --git a/usr.bin/diff3/tests/Makefile b/usr.bin/diff3/tests/Makefile index 864f27beede8..e35ab095f2f7 100644 --- a/usr.bin/diff3/tests/Makefile +++ b/usr.bin/diff3/tests/Makefile @@ -23,6 +23,20 @@ ${PACKAGE}FILES+= \ long-A.out \ long-merge.out \ fbsdid1.txt \ - fbsdid2.txt + fbsdid2.txt \ + conflict1.txt \ + conflict2.txt \ + conflict3.txt \ + conflict-merge.out \ + simple1.txt \ + simple2.txt \ + simple3.txt \ + simple-merge.out \ + simple-Em.out \ + conflict-Em.out \ + passwd-test.txt \ + passwd-old.txt \ + passwd-new.txt \ + passwd-Em.out .include diff --git a/usr.bin/diff3/tests/conflict1.txt b/usr.bin/diff3/tests/conflict1.txt new file mode 100644 index 000000000000..d5bde7598f68 --- /dev/null +++ b/usr.bin/diff3/tests/conflict1.txt @@ -0,0 +1,5 @@ +# root: me@my.domain + +# Basic system aliases -- these MUST be present +MAILER-DAEMON: postmaster +postmaster: root diff --git a/usr.bin/diff3/tests/conflict2.txt b/usr.bin/diff3/tests/conflict2.txt new file mode 100644 index 000000000000..9afb26959e35 --- /dev/null +++ b/usr.bin/diff3/tests/conflict2.txt @@ -0,0 +1,9 @@ +#root:me@my.domain + +#Basicsystemaliases--theseMUSTbepresent +MAILER-DAEMON:postmaster +postmaster:root + +#Generalredirectionsforpseudoaccounts +_dhcp:root +_pflogd:root diff --git a/usr.bin/diff3/tests/conflict3.txt b/usr.bin/diff3/tests/conflict3.txt new file mode 100644 index 000000000000..14ac33b41853 --- /dev/null +++ b/usr.bin/diff3/tests/conflict3.txt @@ -0,0 +1,5 @@ +root:someone@example.com + +#Basicsystemaliases--theseMUSTbepresent +MAILER-DAEMON:postmaster +postmaster:root diff --git a/usr.bin/diff3/tests/diff3_test.sh b/usr.bin/diff3/tests/diff3_test.sh index 3cbd7dac1ed9..4510653bcd47 100755 --- a/usr.bin/diff3/tests/diff3_test.sh +++ b/usr.bin/diff3/tests/diff3_test.sh @@ -5,6 +5,11 @@ atf_test_case diff3_ed atf_test_case diff3_A atf_test_case diff3_merge atf_test_case diff3_E_merge +atf_test_case diff3_merge_conflict +atf_test_case diff3_merge_simple +atf_test_case diff3_Em_simple +atf_test_case diff3_Em_conflict +atf_test_case diff3_Em_insert diff3_body() { @@ -20,10 +25,10 @@ diff3_body() atf_check -o file:$(atf_get_srcdir)/2.out \ diff3 -e $(atf_get_srcdir)/1.txt $(atf_get_srcdir)/2.txt $(atf_get_srcdir)/3.txt - atf_check -o file:$(atf_get_srcdir)/3.out \ + atf_check -s exit:1 -o file:$(atf_get_srcdir)/3.out \ diff3 -E -L 1 -L 2 -L 3 $(atf_get_srcdir)/1.txt $(atf_get_srcdir)/2.txt $(atf_get_srcdir)/3.txt - atf_check -o file:$(atf_get_srcdir)/4.out \ + atf_check -s exit:1 -o file:$(atf_get_srcdir)/4.out \ diff3 -X -L 1 -L 2 -L 3 $(atf_get_srcdir)/1.txt $(atf_get_srcdir)/2.txt $(atf_get_srcdir)/3.txt atf_check -o file:$(atf_get_srcdir)/5.out \ @@ -75,7 +80,6 @@ expected="<<<<<<< 2 ======= # \$FreeBSD: head/local 12345 jhb \$ >>>>>>> 3 -# \$FreeBSD: head/local 12345 jhb \$ this is a file @@ -97,6 +101,36 @@ these are some local mods to the file } +diff3_merge_conflict_body() +{ + atf_check -s exit:1 -o file:$(atf_get_srcdir)/conflict-merge.out \ + diff3 -m -L conflict3.txt -L conflict1.txt -L conflict2.txt $(atf_get_srcdir)/conflict3.txt $(atf_get_srcdir)/conflict1.txt $(atf_get_srcdir)/conflict2.txt +} + +diff3_merge_simple_body() +{ + atf_check -s exit:0 -o file:$(atf_get_srcdir)/simple-merge.out \ + diff3 -m $(atf_get_srcdir)/simple3.txt $(atf_get_srcdir)/simple1.txt $(atf_get_srcdir)/simple2.txt +} + +diff3_Em_simple_body() +{ + atf_check -s exit:0 -o file:$(atf_get_srcdir)/simple-Em.out \ + diff3 -E -m $(atf_get_srcdir)/simple3.txt $(atf_get_srcdir)/simple1.txt $(atf_get_srcdir)/simple2.txt +} + +diff3_Em_conflict_body() +{ + atf_check -s exit:1 -o file:$(atf_get_srcdir)/conflict-Em.out \ + diff3 -E -m -L conflict3.txt -L conflict1.txt -L conflict2.txt $(atf_get_srcdir)/conflict3.txt $(atf_get_srcdir)/conflict1.txt $(atf_get_srcdir)/conflict2.txt +} + +diff3_Em_insert_body() +{ + atf_check -s exit:0 -o file:$(atf_get_srcdir)/passwd-Em.out \ + diff3 -E -m $(atf_get_srcdir)/passwd-test.txt $(atf_get_srcdir)/passwd-old.txt $(atf_get_srcdir)/passwd-new.txt +} + atf_init_test_cases() { atf_add_test_case diff3 @@ -105,4 +139,9 @@ atf_init_test_cases() atf_add_test_case diff3_A atf_add_test_case diff3_merge atf_add_test_case diff3_E_merge + atf_add_test_case diff3_merge_conflict + atf_add_test_case diff3_merge_simple + atf_add_test_case diff3_Em_simple + atf_add_test_case diff3_Em_conflict + atf_add_test_case diff3_Em_insert } diff --git a/usr.bin/diff3/tests/passwd-Em.out b/usr.bin/diff3/tests/passwd-Em.out new file mode 100644 index 000000000000..2b52a6440f6b --- /dev/null +++ b/usr.bin/diff3/tests/passwd-Em.out @@ -0,0 +1,16 @@ +# +root::0:0::0:0:Charlie &:/root:/bin/csh +toor:*:0:0::0:0:Bourne-again Superuser:/root: +daemon:*:1:1::0:0:Owner of many system processes:/root:/usr/sbin/nologin +operator:*:2:5::0:0:System &:/:/usr/sbin/nologin +_dhcp:*:65:65::0:0:dhcp programs:/var/empty:/usr/sbin/nologin +uucp:*:66:66::0:0:UUCP pseudo-user:/var/spool/uucppublic:/usr/local/libexec/uucp/uucico +pop:*:68:6::0:0:Post Office Owner:/nonexistent:/usr/sbin/nologin +auditdistd:*:78:77::0:0:Auditdistd unprivileged user:/var/empty:/usr/sbin/nologin +www:*:80:80::0:0:World Wide Web Owner:/nonexistent:/usr/sbin/nologin +hast:*:845:845::0:0:HAST unprivileged user:/var/empty:/usr/sbin/nologin +nobody:*:65534:65534::0:0:Unprivileged user:/nonexistent:/usr/sbin/nologin +john::1001:1001::0:0:John Baldwin:/home/john:/bin/tcsh +messagebus:*:556:556::0:0:D-BUS Daemon User:/nonexistent:/usr/sbin/nologin +polkit:*:562:562::0:0:PolicyKit User:/nonexistent:/usr/sbin/nologin +haldaemon:*:560:560::0:0:HAL Daemon User:/nonexistent:/usr/sbin/nologin diff --git a/usr.bin/diff3/tests/passwd-new.txt b/usr.bin/diff3/tests/passwd-new.txt new file mode 100644 index 000000000000..8bec617219a3 --- /dev/null +++ b/usr.bin/diff3/tests/passwd-new.txt @@ -0,0 +1,12 @@ +# +root::0:0::0:0:Charlie &:/root:/bin/csh +toor:*:0:0::0:0:Bourne-again Superuser:/root: +daemon:*:1:1::0:0:Owner of many system processes:/root:/usr/sbin/nologin +operator:*:2:5::0:0:System &:/:/usr/sbin/nologin +_dhcp:*:65:65::0:0:dhcp programs:/var/empty:/usr/sbin/nologin +uucp:*:66:66::0:0:UUCP pseudo-user:/var/spool/uucppublic:/usr/local/libexec/uucp/uucico +pop:*:68:6::0:0:Post Office Owner:/nonexistent:/usr/sbin/nologin +auditdistd:*:78:77::0:0:Auditdistd unprivileged user:/var/empty:/usr/sbin/nologin +www:*:80:80::0:0:World Wide Web Owner:/nonexistent:/usr/sbin/nologin +hast:*:845:845::0:0:HAST unprivileged user:/var/empty:/usr/sbin/nologin +nobody:*:65534:65534::0:0:Unprivileged user:/nonexistent:/usr/sbin/nologin diff --git a/usr.bin/diff3/tests/passwd-old.txt b/usr.bin/diff3/tests/passwd-old.txt new file mode 100644 index 000000000000..7a6f936e90c9 --- /dev/null +++ b/usr.bin/diff3/tests/passwd-old.txt @@ -0,0 +1,11 @@ +# +root::0:0::0:0:Charlie &:/root:/bin/csh +toor:*:0:0::0:0:Bourne-again Superuser:/root: +daemon:*:1:1::0:0:Owner of many system processes:/root:/usr/sbin/nologin +operator:*:2:5::0:0:System &:/:/usr/sbin/nologin +_dhcp:*:65:65::0:0:dhcp programs:/var/empty:/usr/sbin/nologin +uucp:*:66:66::0:0:UUCP pseudo-user:/var/spool/uucppublic:/usr/local/libexec/uucp/uucico +pop:*:68:6::0:0:Post Office Owner:/nonexistent:/usr/sbin/nologin +www:*:80:80::0:0:World Wide Web Owner:/nonexistent:/usr/sbin/nologin +hast:*:845:845::0:0:HAST unprivileged user:/var/empty:/usr/sbin/nologin +nobody:*:65534:65534::0:0:Unprivileged user:/nonexistent:/usr/sbin/nologin diff --git a/usr.bin/diff3/tests/passwd-test.txt b/usr.bin/diff3/tests/passwd-test.txt new file mode 100644 index 000000000000..f2b277fb3b4c --- /dev/null +++ b/usr.bin/diff3/tests/passwd-test.txt @@ -0,0 +1,15 @@ +# +root::0:0::0:0:Charlie &:/root:/bin/csh +toor:*:0:0::0:0:Bourne-again Superuser:/root: +daemon:*:1:1::0:0:Owner of many system processes:/root:/usr/sbin/nologin +operator:*:2:5::0:0:System &:/:/usr/sbin/nologin +_dhcp:*:65:65::0:0:dhcp programs:/var/empty:/usr/sbin/nologin +uucp:*:66:66::0:0:UUCP pseudo-user:/var/spool/uucppublic:/usr/local/libexec/uucp/uucico +pop:*:68:6::0:0:Post Office Owner:/nonexistent:/usr/sbin/nologin +www:*:80:80::0:0:World Wide Web Owner:/nonexistent:/usr/sbin/nologin +hast:*:845:845::0:0:HAST unprivileged user:/var/empty:/usr/sbin/nologin +nobody:*:65534:65534::0:0:Unprivileged user:/nonexistent:/usr/sbin/nologin +john::1001:1001::0:0:John Baldwin:/home/john:/bin/tcsh +messagebus:*:556:556::0:0:D-BUS Daemon User:/nonexistent:/usr/sbin/nologin +polkit:*:562:562::0:0:PolicyKit User:/nonexistent:/usr/sbin/nologin +haldaemon:*:560:560::0:0:HAL Daemon User:/nonexistent:/usr/sbin/nologin diff --git a/usr.bin/diff3/tests/simple-Em.out b/usr.bin/diff3/tests/simple-Em.out new file mode 100644 index 000000000000..c9ad1c1bed8f --- /dev/null +++ b/usr.bin/diff3/tests/simple-Em.out @@ -0,0 +1,3 @@ +this is an new line + +this is a local line diff --git a/usr.bin/diff3/tests/simple-merge.out b/usr.bin/diff3/tests/simple-merge.out new file mode 100644 index 000000000000..c9ad1c1bed8f --- /dev/null +++ b/usr.bin/diff3/tests/simple-merge.out @@ -0,0 +1,3 @@ +this is an new line + +this is a local line diff --git a/usr.bin/diff3/tests/simple1.txt b/usr.bin/diff3/tests/simple1.txt new file mode 100644 index 000000000000..4c4c2cd1a4e7 --- /dev/null +++ b/usr.bin/diff3/tests/simple1.txt @@ -0,0 +1,2 @@ +this is an old line + diff --git a/usr.bin/diff3/tests/simple2.txt b/usr.bin/diff3/tests/simple2.txt new file mode 100644 index 000000000000..e880a8af5c39 --- /dev/null +++ b/usr.bin/diff3/tests/simple2.txt @@ -0,0 +1,2 @@ +this is an new line + diff --git a/usr.bin/diff3/tests/simple3.txt b/usr.bin/diff3/tests/simple3.txt new file mode 100644 index 000000000000..4ab38534cba1 --- /dev/null +++ b/usr.bin/diff3/tests/simple3.txt @@ -0,0 +1,3 @@ +this is an old line + +this is a local line