mirror of
https://github.com/opnsense/src.git
synced 2026-05-16 02:59:48 -04:00
diff: add a test case about the non regular file support
(cherry picked from commit c440e7870a)
This commit is contained in:
parent
a3b7f91260
commit
07d72ca905
1 changed files with 15 additions and 0 deletions
|
|
@ -16,6 +16,7 @@ atf_test_case tabsize
|
|||
atf_test_case conflicting_format
|
||||
atf_test_case label
|
||||
atf_test_case report_identical
|
||||
atf_test_case non_regular_file
|
||||
|
||||
simple_body()
|
||||
{
|
||||
|
|
@ -236,6 +237,19 @@ report_identical_body()
|
|||
-o empty diff -s A B
|
||||
}
|
||||
|
||||
non_regular_file_body()
|
||||
{
|
||||
printf "\tA\n" > A
|
||||
mkfifo B
|
||||
printf "\tA\n" > B &
|
||||
|
||||
atf_check diff A B
|
||||
printf "\tB\n" > B &
|
||||
atf_check -s exit:1 \
|
||||
-o inline:"--- A\n+++ B\n@@ -1 +1 @@\n-\tA\n+\tB\n" \
|
||||
diff --label A --label B -u A B
|
||||
}
|
||||
|
||||
atf_init_test_cases()
|
||||
{
|
||||
atf_add_test_case simple
|
||||
|
|
@ -254,4 +268,5 @@ atf_init_test_cases()
|
|||
atf_add_test_case conflicting_format
|
||||
atf_add_test_case label
|
||||
atf_add_test_case report_identical
|
||||
atf_add_test_case non_regular_file
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue