commit: 96d6713ef3da859ba718d4e8f06ce9a0d5df7d94
parent 812e249e965ec9ea871ec9b00558e43dac0615ea
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date: Tue, 1 Mar 2022 18:41:47 +0100
test-bin/tty: Try test for a terminal
Diffstat:
1 file changed, 6 insertions(+), 0 deletions(-)
diff --git a/test-bin/tty b/test-bin/tty
@@ -1,4 +1,9 @@
#!/usr/bin/env atf-sh
+atf_test_case basic
+basic_body() {
+ atf_check -o 'not-inline:not a tty\n' ../bin/tty
+}
+
atf_test_case devnull
devnull_body() {
atf_check -s 'exit:1' -o 'inline:not a tty\n' ../bin/tty </dev/null
@@ -6,5 +11,6 @@ devnull_body() {
atf_init_test_cases() {
cd "$(atf_get_srcdir)" || exit 1
+ atf_add_test_case basic
atf_add_test_case devnull
}