logo

utils

~/.local/bin tools and git-hooks git clone https://hacktivis.me/git/utils.git
commit: 3ebc626245f9c0aa23e7b783d2836cc4110071ca
parent 00a9ba524d22602287df3d8ea8acbd9d6e2b7206
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date:   Fri, 11 Mar 2022 20:50:09 +0100

test-bin/pwd: Add /dev/full test

Diffstat:

Mtest-bin/pwd10++++++++++
1 file changed, 10 insertions(+), 0 deletions(-)

diff --git a/test-bin/pwd b/test-bin/pwd @@ -25,9 +25,19 @@ enoent_cleanup() { rm -fr "$(atf_get_srcdir)/remove-me" } +atf_test_case devfull +devfull_body() { + has_glibc && atf_expect_fail "glibc ignoring write errors for puts()" + [ "$(uname -s)" = "NetBSD" ] && atf_expect_fail "NetBSD ignoring write errors for puts()" + [ "$(uname -s)" = "FreeBSD" ] && atf_expect_fail "FreeBSD ignoring write errors for puts()" + + atf_check -s exit:1 sh -c '../bin/pwd >/dev/full' +} + atf_init_test_cases() { cd "$(atf_get_srcdir)" || exit 1 atf_add_test_case simple atf_add_test_case args atf_add_test_case enoent + atf_add_test_case devfull }