logo

utils

~/.local/bin tools and git-hooks git clone https://hacktivis.me/git/utils.git
commit: e001c87696f04e2d77358e8a979d9cf14eefa91c
parent 6d0f22e7deaf1b1aa5ae4df559fef59d5a40e8e0
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date:   Sun, 27 Feb 2022 04:38:34 +0100

test-bin/cat: regroup /dev/null test cases

Diffstat:

Mtest-bin/cat17++++-------------
1 file changed, 4 insertions(+), 13 deletions(-)

diff --git a/test-bin/cat b/test-bin/cat @@ -14,18 +14,10 @@ alldashinput_body() { atf_check -o file:inputs/all_bytes ../bin/cat - <inputs/all_bytes } -atf_test_case nullfile -nullfile_body() { +atf_test_case devnull +devnull_body() { atf_check ../bin/cat /dev/null -} - -atf_test_case nullinput -nullinput_body() { atf_check ../bin/cat </dev/null -} - -atf_test_case nulldashinput -nulldashinput_body() { atf_check ../bin/cat - </dev/null } @@ -65,6 +57,7 @@ enoent_body() { atf_test_case doubledash doubledash_body() { atf_check -o file:inputs/all_bytes -- ../bin/cat -- inputs/all_bytes + # shellcheck disable=SC1112 atf_check -s exit:1 -e 'inline:\nError opening ‘---’: No such file or directory\n' -o empty -- ../bin/cat --- inputs/all_bytes } @@ -73,9 +66,7 @@ atf_init_test_cases() { atf_add_test_case allfile atf_add_test_case allinput atf_add_test_case alldashinput - atf_add_test_case nullfile - atf_add_test_case nullinput - atf_add_test_case nulldashinput + atf_add_test_case devnull atf_add_test_case noperm atf_add_test_case devfull atf_add_test_case readslash