logo

utils-std

Collection of commonly available Unix tools
commit: ee95a30e5438e0aa61294e84892122a310770f43
parent 4cb8965459be5328f5634814577ca745fe50ba0a
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date:   Thu, 13 Jun 2024 15:01:06 +0200

test-cmd/logname*: Change from ATF to tap.sh

Diffstat:

Mtest-cmd/Kyuafile2+-
Dtest-cmd/logname18------------------
Atest-cmd/logname.sh13+++++++++++++
3 files changed, 14 insertions(+), 19 deletions(-)

diff --git a/test-cmd/Kyuafile b/test-cmd/Kyuafile @@ -13,7 +13,6 @@ atf_test_program{name="df", required_files=basedir.."/cmd/df", timeout=1} atf_test_program{name="false", required_files=basedir.."/cmd/false", timeout=1} atf_test_program{name="id", required_files=basedir.."/cmd/id", timeout=1} atf_test_program{name="link", required_files=basedir.."/cmd/link", timeout=1} -atf_test_program{name="logname", required_files=basedir.."/cmd/logname", timeout=1} atf_test_program{name="pwd", required_files=basedir.."/cmd/pwd", timeout=1} atf_test_program{name="strings", required_files=basedir.."/cmd/strings", timeout=1} atf_test_program{name="tee", required_files=basedir.."/cmd/tee", timeout=1} @@ -27,6 +26,7 @@ tap_test_program{name="date.sh", required_files=basedir.."/cmd/date", timeout=1} tap_test_program{name="dirname.sh", required_files=basedir.."/cmd/dirname", timeout=1} tap_test_program{name="echo.sh", required_files=basedir.."/cmd/echo", timeout=1} tap_test_program{name="env.sh", required_files=basedir.."/cmd/env", timeout=1} +tap_test_program{name="logname.sh", required_files=basedir.."/cmd/logname", timeout=1} tap_test_program{name="seq.sh", required_files=basedir.."/cmd/seq", timeout=1} tap_test_program{name="test.sh", required_files=basedir.."/cmd/test", timeout=2} tap_test_program{name="true.sh", required_files=basedir.."/cmd/true", timeout=1} diff --git a/test-cmd/logname b/test-cmd/logname @@ -1,18 +0,0 @@ -#!/usr/bin/env atf-sh -# SPDX-FileCopyrightText: 2017 Haelwenn (lanodan) Monnier <contact+utils@hacktivis.me> -# SPDX-License-Identifier: MPL-2.0 - -atf_test_case environ -environ_body() { - test -n "${LOGNAME}" || atf_skip "$LOGNAME not set (wtf)" - - atf_check -o "inline:${LOGNAME}\n" ../cmd/logname -} - -atf_init_test_cases() { - cd "$(atf_get_srcdir)" || exit 1 - - . ../test_functions.sh - - atf_add_test_case environ -} diff --git a/test-cmd/logname.sh b/test-cmd/logname.sh @@ -0,0 +1,13 @@ +#!/bin/sh +# SPDX-FileCopyrightText: 2017 Haelwenn (lanodan) Monnier <contact+utils@hacktivis.me> +# SPDX-License-Identifier: MPL-2.0 + +target="$(dirname "$0")/../cmd/logname" +plans=1 +. "$(dirname "$0")/tap.sh" + +if ! test -n "${LOGNAME}"; then + skip basic '$LOGNAME not set (wtf)' +else + t basic '' "${LOGNAME}"$'\n' +fi