git: 13860e71eb50 - main - diff: add a test case for failed -s option
Baptiste Daroussin
bapt at FreeBSD.org
Mon Jan 25 19:39:02 UTC 2021
The branch main has been updated by bapt:
URL: https://cgit.FreeBSD.org/src/commit/?id=13860e71eb501f498a2263f44ea9244f6830b61c
commit 13860e71eb501f498a2263f44ea9244f6830b61c
Author: Baptiste Daroussin <bapt at FreeBSD.org>
AuthorDate: 2021-01-25 17:40:12 +0000
Commit: Baptiste Daroussin <bapt at FreeBSD.org>
CommitDate: 2021-01-25 19:37:58 +0000
diff: add a test case for failed -s option
---
usr.bin/diff/tests/diff_test.sh | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/usr.bin/diff/tests/diff_test.sh b/usr.bin/diff/tests/diff_test.sh
index 7ee88d1fe607..6da2bbaea34d 100755
--- a/usr.bin/diff/tests/diff_test.sh
+++ b/usr.bin/diff/tests/diff_test.sh
@@ -15,6 +15,7 @@ atf_test_case Nflag
atf_test_case tabsize
atf_test_case conflicting_format
atf_test_case label
+atf_test_case report_identical
simple_body()
{
@@ -226,6 +227,15 @@ label_body()
-s exit:1 diff --label hello --label world `which diff` `which ls`
}
+report_identical_body()
+{
+ printf "\tA\n" > A
+ printf "\tB\n" > B
+ chmod -r B
+ atf_check -s exit:2 -e inline:"diff: B: Permission denied\n" \
+ -o empty diff -s A B
+}
+
atf_init_test_cases()
{
atf_add_test_case simple
@@ -243,4 +253,5 @@ atf_init_test_cases()
atf_add_test_case tabsize
atf_add_test_case conflicting_format
atf_add_test_case label
+ atf_add_test_case report_identical
}
More information about the dev-commits-src-main
mailing list