summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2025-02-07 14:40:50 -0500
committerTavian Barnes <tavianator@tavianator.com>2025-02-07 14:40:50 -0500
commit069b203617ca643b94122e41d34699c4f2ef949e (patch)
treeaddba5eb2b53a15c06addec810af97453649e49d /tests
parent232a140327e3e6b8cb1699c526e2ea1c0decc68a (diff)
downloadbfs-069b203617ca643b94122e41d34699c4f2ef949e.tar.xz
tests: Don't shell out to tr just to replace slashes with dashes
Diffstat (limited to 'tests')
-rw-r--r--tests/color.sh4
1 files changed, 1 insertions, 3 deletions
diff --git a/tests/color.sh b/tests/color.sh
index 8447824..9e2e0f6 100644
--- a/tests/color.sh
+++ b/tests/color.sh
@@ -46,9 +46,7 @@ show_bar() {
# Name the pipe deterministically based on the ttyname, so that concurrent
# tests.sh runs on the same terminal (e.g. make -jN check) cooperate
- local pipe
- pipe=$(printf '%s' "$TTY" | tr '/' '-')
- pipe="${TMPDIR:-/tmp}/bfs$pipe.bar"
+ local pipe="${TMPDIR:-/tmp}/bfs${TTY//\//-}.bar"
if mkfifo "$pipe" 2>/dev/null; then
# We won the race, create the background process to manage the bar