Date: Wed, 27 Jan 2021 11:18:51 GMT From: Baptiste Daroussin <bapt@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: c440e7870a02 - main - diff: add a test case about the non regular file support Message-ID: <202101271118.10RBIpwh083661@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by bapt: URL: https://cgit.FreeBSD.org/src/commit/?id=c440e7870a020546ad241848e2ff8e9cb27a3073 commit c440e7870a020546ad241848e2ff8e9cb27a3073 Author: Baptiste Daroussin <bapt@FreeBSD.org> AuthorDate: 2021-01-26 10:38:36 +0000 Commit: Baptiste Daroussin <bapt@FreeBSD.org> CommitDate: 2021-01-27 11:18:45 +0000 diff: add a test case about the non regular file support --- usr.bin/diff/tests/diff_test.sh | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/usr.bin/diff/tests/diff_test.sh b/usr.bin/diff/tests/diff_test.sh index 6da2bbaea34d..60b56f0d9067 100755 --- a/usr.bin/diff/tests/diff_test.sh +++ b/usr.bin/diff/tests/diff_test.sh @@ -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 }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202101271118.10RBIpwh083661>