logo

utils

~/.local/bin tools and git-hooks git clone https://hacktivis.me/git/utils.git
commit: 90969537e067d6b2b8525f38b96f1786106c5cc5
parent 22f668f2727363989953912fcaaa3ca4aee83367
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date:   Fri, 11 Mar 2022 20:32:28 +0100

test-bin/dirname: badarg

Diffstat:

Mtest-bin/dirname6++++++
1 file changed, 6 insertions(+), 0 deletions(-)

diff --git a/test-bin/dirname b/test-bin/dirname @@ -20,9 +20,15 @@ two_dash_body() { atf_check -o "inline:/usr\n" ../bin/dirname -- "/usr//bin" } +atf_test_case badarg +badarg_body() { + atf_check -s exit:1 -e "inline:usage: dirname string\n" ../bin/dirname -a "/usr//bin" +} + atf_init_test_cases() { cd "$(atf_get_srcdir)" || exit 1 atf_add_test_case noargs + atf_add_test_case badarg atf_add_test_case one_slash atf_add_test_case two_slash atf_add_test_case two_dash