commit: f232517194f2abba93ad78c148e068bdf6d6c54a
parent 5b511928e0516a0df63e99070956d5d41102ba4a
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date: Thu, 13 Jun 2024 19:24:53 +0200
test-cmd/false: Change from ATF to tap.sh
Diffstat:
3 files changed, 12 insertions(+), 26 deletions(-)
diff --git a/test-cmd/Kyuafile b/test-cmd/Kyuafile
@@ -10,7 +10,6 @@ basedir = fs.dirname(fs.dirname(current_kyuafile()))
atf_test_program{name="base64", required_files=basedir.."/cmd/base64", timeout=1}
atf_test_program{name="cat", required_files=basedir.."/cmd/cat", timeout=1}
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="pwd", required_files=basedir.."/cmd/pwd", timeout=1}
@@ -26,6 +25,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="false.sh", required_files=basedir.."/cmd/false", 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}
diff --git a/test-cmd/false b/test-cmd/false
@@ -1,25 +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 basic
-basic_body() {
- atf_check -s exit:1 ../cmd/false
-}
-
-atf_test_case nohelp
-nohelp_body() {
- atf_check -s exit:1 ../cmd/false --help
-}
-
-atf_test_case devfull
-devfull_body() {
- atf_check -s exit:1 ../cmd/false --help >/dev/full
-}
-
-atf_init_test_cases() {
- cd "$(atf_get_srcdir)" || exit 1
- atf_add_test_case basic
- atf_add_test_case nohelp
- atf_add_test_case devfull
-}
diff --git a/test-cmd/false.sh b/test-cmd/false.sh
@@ -0,0 +1,11 @@
+#!/bin/sh
+# SPDX-FileCopyrightText: 2017 Haelwenn (lanodan) Monnier <contact+utils@hacktivis.me>
+# SPDX-License-Identifier: MPL-2.0
+
+target="$(dirname "$0")/../cmd/false"
+plans=3
+. "$(dirname "$0")/tap.sh"
+
+t --exit=1 basic '' ''
+t --exit=1 nohelp '--help' ''
+t --exit=1 noversion '--version' ''