Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 1 Feb 2021 13:05:30 GMT
From:      Baptiste Daroussin <bapt@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: 0702bf9c495d - stable/13 - diff: add a test case for failed -s option
Message-ID:  <202102011305.111D5Uom026644@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by bapt:

URL: https://cgit.FreeBSD.org/src/commit/?id=0702bf9c495d517ef30432de1990f9a301598942

commit 0702bf9c495d517ef30432de1990f9a301598942
Author:     Baptiste Daroussin <bapt@FreeBSD.org>
AuthorDate: 2021-01-25 17:40:12 +0000
Commit:     Baptiste Daroussin <bapt@FreeBSD.org>
CommitDate: 2021-02-01 13:05:24 +0000

    diff: add a test case for failed -s option
    
    (cherry picked from commit 13860e71eb501f498a2263f44ea9244f6830b61c)
---
 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
 }



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202102011305.111D5Uom026644>