Add some tests for brief (--brief/-q) format

MFC after:	2 months
MFC with:	r321076
This commit is contained in:
Enji Cooper 2017-07-17 17:50:50 +00:00
parent 4d8c579095
commit 4574a545d2

View File

@ -7,6 +7,7 @@ atf_test_case header_ns
atf_test_case ifdef
atf_test_case group_format
atf_test_case side_by_side
atf_test_case brief_format
simple_body()
{
@ -109,6 +110,23 @@ side_by_side_body()
diff -W 65 -y --suppress-common-lines A B
}
brief_format_body()
{
atf_check mkdir A B
atf_check -x "echo 1 > A/test-file"
atf_check -x "echo 2 > B/test-file"
atf_check cp -Rf A C
atf_check \
-s exit:1 \
-o inline:"Files A/test-file and B/test-file differ\n" \
diff -Nrq A B
atf_check diff -Nrq A C
}
atf_init_test_cases()
{
atf_add_test_case simple
@ -118,4 +136,5 @@ atf_init_test_cases()
atf_add_test_case ifdef
atf_add_test_case group_format
atf_add_test_case side_by_side
atf_add_test_case brief_format
}