1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
|
From: =?utf-8?b?Ik1hcmNvIFRyZXZpc2FuIChUcmV2acOxbyki?= <mail@3v1n0.net>
Date: Wed, 24 Sep 2025 19:14:50 +0200
Subject: installed-tests/testCommandLine: Use bash to write escaped sequences
testCommandLine requires posix sh, and sh does not support $'...'
quoting since it's a bash extension (see [1]).
So instead of just using bash for everything (still not a bad thing),
let's just use bash to handle the problematic code.
[1] https://www.shellcheck.net/wiki/SC3003
Origin: https://gitlab.gnome.org/GNOME/gjs/-/merge_requests/1032
---
installed-tests/scripts/testCommandLine.sh | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/installed-tests/scripts/testCommandLine.sh b/installed-tests/scripts/testCommandLine.sh
index 1d6cdaf..67a06b7 100755
--- a/installed-tests/scripts/testCommandLine.sh
+++ b/installed-tests/scripts/testCommandLine.sh
@@ -212,10 +212,10 @@ report "Unicode pathed encoding should work for module run."
rm -r Код
# non UTF8 file names throws error
-touch $'\xff'
+bash -c "touch $'\xff'"
G_FILENAME_ENCODING=utf8 $gjs -m printFiles.js 2>&1 | grep -q 'Gjs-CRITICAL.*Could not convert filename string to UTF-8 for string: \\377'
report "Throws error if filename is not UTF8"
-rm ''$'\377'
+bash -c "rm ''$'\377'"
# gjs --help prints GJS help
$gjs --help >/dev/null
|