commit: f2728319b070078087604c0ec6fa9b4cabe5ef23
parent dc097062f96b9b532cae969eed049b5e6bd4b9ce
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date: Fri, 11 Feb 2022 19:46:34 +0100
test-bin/echo: Add tests for write error
Diffstat:
1 file changed, 6 insertions(+), 0 deletions(-)
diff --git a/test-bin/echo b/test-bin/echo
@@ -14,9 +14,15 @@ doubledash_body() {
atf_check -o "inline:-- hello\n" ../bin/echo -- hello
}
+atf_test_case devfull
+devfull_body() {
+ atf_check -s exit:1 -e 'inline:write(1, buffer, arg_len): No space left on device\n' sh -c '../bin/echo hello world >/dev/full'
+}
+
atf_init_test_cases() {
cd "$(atf_get_srcdir)"
atf_add_test_case empty
atf_add_test_case hello
atf_add_test_case doubledash
+ atf_add_test_case devfull
}