logo

utils

~/.local/bin tools and git-hooks git clone https://hacktivis.me/git/utils.git
commit: 81ceeaefc849b1b15aebcad600d251efcbc07713
parent 3bfac2656fbf458a93c281b4cfc4c589c9f2bfef
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date:   Tue,  1 Mar 2022 13:37:32 +0100

test-bin/tty: New

Diffstat:

Mtest-bin/Kyuafile3++-
Atest-bin/tty10++++++++++
2 files changed, 12 insertions(+), 1 deletion(-)

diff --git a/test-bin/Kyuafile b/test-bin/Kyuafile @@ -4,7 +4,7 @@ test_suite("utils") basedir = fs.dirname(fs.dirname(current_kyuafile())) --- 5,$|LC_ALL=C.UTF-8 sort +-- 7,$|LC_ALL=C.UTF-8 sort atf_test_program{name="args", required_files=basedir.."/bin/args"} atf_test_program{name="basename", required_files=basedir.."/bin/basename"} atf_test_program{name="cat", required_files=basedir.."/bin/cat"} @@ -19,4 +19,5 @@ atf_test_program{name="sname", required_files=basedir.."/bin/sname"} atf_test_program{name="strings", required_files=basedir.."/bin/strings"} atf_test_program{name="tee", required_files=basedir.."/bin/tee"} atf_test_program{name="true", required_files=basedir.."/bin/true"} +atf_test_program{name="tty", required_files=basedir.."/bin/tty"} atf_test_program{name="xcd", required_files=basedir.."/bin/xcd"} diff --git a/test-bin/tty b/test-bin/tty @@ -0,0 +1,10 @@ +#!/usr/bin/env atf-sh +atf_test_case devnull +devnull_body() { + atf_check -s 'exit:1' -o 'inline:not a tty\n' ../bin/tty </dev/null +} + +atf_init_test_cases() { + cd "$(atf_get_srcdir)" || exit 1 + atf_add_test_case devnull +}