logo

utils

~/.local/bin tools and git-hooks git clone https://hacktivis.me/git/utils.git
commit: 7534795c969e1040f414b9026c2e10090c3d5803
parent 3f7b3ea1752b6bcfaa8ff766e2f111727967c53e
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date:   Fri,  9 Jul 2021 02:44:10 +0200

tests: POSIX_ME_HARDER

Diffstat:

MMakefile2+-
Mtest-bin/basename18+++++++++---------
Mtest-bin/dirname18+++++++++---------
3 files changed, 19 insertions(+), 19 deletions(-)

diff --git a/Makefile b/Makefile @@ -3,7 +3,7 @@ all: cd sbin ; $(MAKE) test: all - kyua test || (kyua report --verbose; false) + POSIX_ME_HARDER=1 POSIXLY_CORRECT=1 kyua test || (kyua report --verbose; false) clean: cd bin ; $(MAKE) clean diff --git a/test-bin/basename b/test-bin/basename @@ -5,18 +5,18 @@ noargs_body() { atf_check -o "inline:.\n" ../bin/basename } -atf_test_case 1slash -1slash_body() { +atf_test_case one_slash +one_slash_body() { atf_check -o "inline:bin\n" ../bin/basename "/usr/bin" } -atf_test_case 2slash -2slash_body() { +atf_test_case two_slash +two_slash_body() { atf_check -o "inline:bin\n" ../bin/basename "/usr//bin" } -atf_test_case 2dash -2dash_body() { +atf_test_case two_dash +two_dash_body() { atf_check -o "inline:bin\n" ../bin/basename -- "/usr//bin" } @@ -28,8 +28,8 @@ testopt_body() { atf_init_test_cases() { cd "$(atf_get_srcdir)" atf_add_test_case noargs - atf_add_test_case 1slash - atf_add_test_case 2slash - atf_add_test_case 2dash + atf_add_test_case one_slash + atf_add_test_case two_slash + atf_add_test_case two_dash atf_add_test_case testopt } diff --git a/test-bin/dirname b/test-bin/dirname @@ -5,25 +5,25 @@ noargs_body() { atf_check -e "inline:usage: dirname string\n" -s exit:1 ../bin/dirname } -atf_test_case 1slash -1slash_body() { +atf_test_case one_slash +one_slash_body() { atf_check -o "inline:/usr\n" ../bin/dirname "/usr/bin" } -atf_test_case 2slash -2slash_body() { +atf_test_case two_slash +two_slash_body() { atf_check -o "inline:/usr\n" ../bin/dirname "/usr//bin" } -atf_test_case 2dash -2dash_body() { +atf_test_case two_dash +two_dash_body() { atf_check -o "inline:/usr\n" ../bin/dirname -- "/usr//bin" } atf_init_test_cases() { cd "$(atf_get_srcdir)" atf_add_test_case noargs - atf_add_test_case 1slash - atf_add_test_case 2slash - atf_add_test_case 2dash + atf_add_test_case one_slash + atf_add_test_case two_slash + atf_add_test_case two_dash }