From: Pádraig Brady
Date: Sat, 1 Aug 2026 10:43:36 +0000 (+0100)
Subject: tests: add tests to ensure quoting to tty
X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cdfaf73b8f09f10ff32e28440b28cb6f39f9c621;p=thirdparty%2Fcoreutils.git
tests: add tests to ensure quoting to tty
* tests/misc/tty-quoting.sh: Add positive test for
basename, du, ls, readlink, and realpath quoting.
* tests/local.mk: Reference the new test.
---
diff --git a/tests/local.mk b/tests/local.mk
index f0fdd00865..a002904a77 100644
--- a/tests/local.mk
+++ b/tests/local.mk
@@ -186,6 +186,7 @@ all_tests = \
tests/misc/read-errors.sh \
tests/misc/responsive.sh \
tests/misc/traversal-missing.sh \
+ tests/misc/tty-quoting.sh \
tests/misc/warning-errors.sh \
tests/misc/write-errors.sh \
tests/tail/basic-seek.sh \
diff --git a/tests/misc/tty-quoting.sh b/tests/misc/tty-quoting.sh
new file mode 100755
index 0000000000..fe3f812894
--- /dev/null
+++ b/tests/misc/tty-quoting.sh
@@ -0,0 +1,63 @@
+#!/bin/sh
+# Test quoting output when standard output is a terminal.
+
+# Copyright (C) 2026 Free Software Foundation, Inc.
+
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see