aboutsummaryrefslogtreecommitdiff
path: root/usr.bin/diff3/tests
diff options
context:
space:
mode:
authorPiotr Pawel Stefaniak <pstef@FreeBSD.org>2021-08-21 00:28:58 +0000
committerPiotr Pawel Stefaniak <pstef@FreeBSD.org>2021-08-23 05:04:28 +0000
commit54a3415cb69e1ea0e6533ca3fc168deba64f249f (patch)
tree30a8e5a3e8540b2ac337e0fb6c145c31442fea20 /usr.bin/diff3/tests
parente8ff95356ceaaa941251056e9d0a4211bf428e06 (diff)
Diffstat (limited to 'usr.bin/diff3/tests')
-rw-r--r--usr.bin/diff3/tests/1cr.txt6
-rw-r--r--usr.bin/diff3/tests/Makefile1
-rwxr-xr-xusr.bin/diff3/tests/diff3_test.sh3
3 files changed, 10 insertions, 0 deletions
diff --git a/usr.bin/diff3/tests/1cr.txt b/usr.bin/diff3/tests/1cr.txt
new file mode 100644
index 000000000000..c24bf241e68a
--- /dev/null
+++ b/usr.bin/diff3/tests/1cr.txt
@@ -0,0 +1,6 @@
+This is a more complete test
+which multiple lines
+and a few typ0s to fix
+also I plan to add few lines
+ and to remove
+other lines
diff --git a/usr.bin/diff3/tests/Makefile b/usr.bin/diff3/tests/Makefile
index dd75be1ca02a..2ec7fbaab564 100644
--- a/usr.bin/diff3/tests/Makefile
+++ b/usr.bin/diff3/tests/Makefile
@@ -6,6 +6,7 @@ ATF_TESTS_SH= diff3_test
${PACKAGE}FILES+= \
1.txt \
+ 1cr.txt \
2.txt \
3.txt \
1.out \
diff --git a/usr.bin/diff3/tests/diff3_test.sh b/usr.bin/diff3/tests/diff3_test.sh
index 6c479de2e9c0..f4b5adf95700 100755
--- a/usr.bin/diff3/tests/diff3_test.sh
+++ b/usr.bin/diff3/tests/diff3_test.sh
@@ -8,6 +8,9 @@ diff3_body()
atf_check -o file:$(atf_get_srcdir)/1.out \
diff3 $(atf_get_srcdir)/1.txt $(atf_get_srcdir)/2.txt $(atf_get_srcdir)/3.txt
+ atf_check -o file:$(atf_get_srcdir)/1.out \
+ diff3 --strip-trailing-cr $(atf_get_srcdir)/1cr.txt $(atf_get_srcdir)/2.txt $(atf_get_srcdir)/3.txt
+
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