aboutsummaryrefslogtreecommitdiff
path: root/usr.bin/diff/tests
diff options
context:
space:
mode:
authorEnji Cooper <ngie@FreeBSD.org>2017-07-17 18:07:53 +0000
committerEnji Cooper <ngie@FreeBSD.org>2017-07-17 18:07:53 +0000
commit4017abe27c6436d80a08577c6e9ae0e9dc11d7ec (patch)
tree6124a24ac2f869437d80018ebd0f34d265f43511 /usr.bin/diff/tests
parent2d920b13cbf3fe93b5ed2c4aa4254d24c0fc95bb (diff)
Notes
Diffstat (limited to 'usr.bin/diff/tests')
-rwxr-xr-xusr.bin/diff/tests/diff_test.sh17
1 files changed, 15 insertions, 2 deletions
diff --git a/usr.bin/diff/tests/diff_test.sh b/usr.bin/diff/tests/diff_test.sh
index 12d09eab4dd44..9b97f19f72970 100755
--- a/usr.bin/diff/tests/diff_test.sh
+++ b/usr.bin/diff/tests/diff_test.sh
@@ -118,13 +118,26 @@ brief_format_body()
atf_check -x "echo 2 > B/test-file"
atf_check cp -Rf A C
+ atf_check cp -Rf A D
+
+ atf_check -x "echo 3 > D/another-test-file"
atf_check \
-s exit:1 \
-o inline:"Files A/test-file and B/test-file differ\n" \
- diff -Nrq A B
+ diff -rq A B
+
+ atf_check diff -rq A C
- atf_check diff -Nrq A C
+ atf_check \
+ -s exit:1 \
+ -o inline:"Only in D: another-test-file\n" \
+ diff -rq A D
+
+ atf_check \
+ -s exit:1 \
+ -o inline:"Files A/another-test-file and D/another-test-file differ\n" \
+ diff -Nrq A D
}
atf_init_test_cases()