From 413d98fb45f717b2732a93bd26c8156ef7a87fa6 Mon Sep 17 00:00:00 2001 From: Andrew Kaster Date: Fri, 21 May 2021 02:27:22 -0600 Subject: [PATCH] Shell: Use /tmp for all file operations valid.sh test Not doing so sometimes intermittently caused the '*' glob expansion test to fail and lock up the shell. --- Userland/Shell/Tests/valid.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Userland/Shell/Tests/valid.sh b/Userland/Shell/Tests/valid.sh index b494ce56b2..a33ad2307e 100644 --- a/Userland/Shell/Tests/valid.sh +++ b/Userland/Shell/Tests/valid.sh @@ -65,8 +65,8 @@ word_count=(() | wc -w) if not test "$(echo well hello friends $word_count)" -eq 3 { fail variable containing pipeline } # Globs -mkdir sh-test -pushd sh-test +mkdir -p /tmp/sh-test +pushd /tmp/sh-test touch (a b c)(d e f) if not test "$(echo a*)" = "ad ae af" { fail '*' glob expansion } if not test "$(echo a?)" = "ad ae af" { fail '?' glob expansion } @@ -78,7 +78,7 @@ pushd sh-test if not test "$(echo x(a*))" = "xad xae xaf" { fail globs in lists do not resolve to lists } if not test "$(echo "foo"a*)" = "fooad fooae fooaf" { fail globs join to dquoted strings } popd -rm -fr sh-test +rm -fr /tmp/sh-test # Setopt setopt --inline_exec_keep_empty_segments