diff: add a test case for failed -s option
This commit is contained in:
parent
94ac312a71
commit
13860e71eb
@ -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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user