commit: 591b5e29bd0c802d0d34b2ad00b47b427f806a8c
parent b5ec27b88c9b729e08f49b748d7b8728d9f2496c
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date: Tue, 15 Feb 2022 01:46:09 +0100
test-bin: NetBSD fixes
Diffstat:
2 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/test-bin/basename b/test-bin/basename
@@ -32,7 +32,11 @@ usage_body() {
atf_test_case devfull
devfull_body() {
- grep -q '#define\W__GLIBC__' /usr/include/features.h && atf_expect_fail "glibc ignoring write errors for puts()"
+ if test -f /usr/include/features.h && grep -q '#define\W__GLIBC__' /usr/include/features.h
+ then
+ atf_expect_fail "glibc ignoring write errors for puts()"
+ fi
+ [ "$(uname -s)" = "NetBSD" ] && atf_expect_fail "NetBSD ignoring write errors for puts()"
atf_check -s exit:1 -e 'inline:basename: puts: No space left on device\n' sh -c '../bin/basename >/dev/full'
atf_check -s exit:1 -e 'inline:basename: puts: No space left on device\n' sh -c '../bin/basename "/usr/bin" >/dev/full'
diff --git a/test-bin/pwd b/test-bin/pwd
@@ -2,6 +2,7 @@
atf_test_case simple
simple_body() {
atf_check -o "inline:${PWD}\n" ../bin/pwd
+ atf_check -o "inline:$(atf_get_srcdir)\n" ../bin/pwd
}
atf_test_case args
@@ -13,9 +14,12 @@ atf_test_case enoent cleanup
enoent_body() {
mkdir -p "$(atf_get_srcdir)/remove-me" || exit 1
cd "$(atf_get_srcdir)/remove-me" || exit 1
+
+ atf_check -o "inline:$(atf_get_srcdir)/remove-me\n" "$(atf_get_srcdir)/../bin/pwd"
+
rm -fr "$(atf_get_srcdir)/remove-me" || exit 1
- atf_check -s exit:1 -e 'inline:getcwd: No such file or directory\n' ../../bin/pwd
+ atf_check -s exit:1 -e 'inline:getcwd: No such file or directory\n' "$(atf_get_srcdir)/../bin/pwd"
}
enoent_cleanup() {
rm -fr "$(atf_get_srcdir)/remove-me"