commit: 64535a99c5e8f517e51cf0321c733c1d26f1c4ef
parent ed2b045831035e538ae01dbcded9f33e538b8052
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date: Fri, 13 Sep 2024 03:28:45 +0200
test-cmd/paste.sh: new
Diffstat:
2 files changed, 19 insertions(+), 0 deletions(-)
diff --git a/test-cmd/Kyuafile b/test-cmd/Kyuafile
@@ -30,6 +30,7 @@ tap_test_program{name="join.sh", required_files=basedir.."/cmd/join", timeout=1}
tap_test_program{name="link.sh", required_files=basedir.."/cmd/link", timeout=1}
tap_test_program{name="logname.sh", required_files=basedir.."/cmd/logname", timeout=1}
tap_test_program{name="mktemp.sh", required_files=basedir.."/cmd/mktemp", timeout=1}
+tap_test_program{name="paste.sh", required_files=basedir.."/cmd/paste", timeout=1}
tap_test_program{name="pathchk.sh", required_files=basedir.."/cmd/pathchk", timeout=1}
tap_test_program{name="pwd.sh", required_files=basedir.."/cmd/pwd", timeout=1}
tap_test_program{name="realpath.sh", required_files=basedir.."/cmd/realpath", timeout=1}
diff --git a/test-cmd/paste.sh b/test-cmd/paste.sh
@@ -0,0 +1,18 @@
+#!/bin/sh
+# SPDX-FileCopyrightText: 2017 Haelwenn (lanodan) Monnier <contact+utils@hacktivis.me>
+# SPDX-License-Identifier: MPL-2.0
+
+WD="$(dirname "$0")/../"
+target="${WD}/cmd/paste"
+plans=1
+. "${WD}/test-cmd/tap.sh"
+
+banzai=$(mktemp)
+
+seq 1 1000 > "$banzai"
+cut -b 1-500 -n "$banzai" > "${banzai}.1"
+cut -b 501- -n "$banzai" > "${banzai}.2"
+
+t_file concat "$banzai" -d "\0" "${banzai}.1" "${banzai}.2"
+
+rm "$banzai" "${banzai}.1" "${banzai}.2"