← Commit list

c92755133

Denys Vlasenko
Denys Vlasenko
2025-08-09
SUCCESS Duration: 174s

Subject

shells: fix a typo in var_backslash1.tests, expand it while at it

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

shell/ash_test/ash-vars/var_backslash1.right+3 -2
@@ -1,14 +1,15 @@
a is '\*bc'
b is '\'
c is '*'
-${a##?*} removes everything: ||
+${a##?*} removes everything: || - matches one char, then all
${a##?"*"} removes \*: |bc| - matches one char, then *
${a##\*} removes nothing: |\*bc| - first char is not *
${a##\\*} removes everything: || - matches \, then all
-${a##\\\*} removes \*: || - matches \, then *
+${a##\\\*} removes \*: |bc| - matches \, then *
${a##?$c} removes everything: || - matches one char, then all
${a##?"$c"} removes \*: |bc| - matches one char, then *
${a##\\$c} removes everything: || - matches \, then all
+${a##\\\$c} removes nothing: |\*bc| - matches \, but then second char is not $
${a##\\"$c"} removes \*: |bc| - matches \, then *
${a##$b} removes \: |*bc| - matches \
${a##"$b"} removes \: |*bc| - matches \
shell/ash_test/ash-vars/var_backslash1.tests+3 -2
@@ -4,14 +4,15 @@ c='*'
echo "a is '$a'"
echo "b is '$b'"
echo "c is '$c'"
-echo '${a##?*} removes everything: '"|${a##?*}|"
+echo '${a##?*} removes everything: '"|${a##?*}|"' - matches one char, then all'
echo '${a##?"*"} removes \*: '"|${a##?"*"}|"' - matches one char, then *'
echo '${a##\*} removes nothing: '"|${a##\*}|"' - first char is not *'
echo '${a##\\*} removes everything: '"|${a##\\*}|"' - matches \, then all'
-echo '${a##\\\*} removes \*: '"|${a##\\*}|"' - matches \, then *'
+echo '${a##\\\*} removes \*: '"|${a##\\\*}|"' - matches \, then *'
echo '${a##?$c} removes everything: '"|${a##?$c}|"' - matches one char, then all'
echo '${a##?"$c"} removes \*: '"|${a##?"$c"}|"' - matches one char, then *'
echo '${a##\\$c} removes everything: '"|${a##\\$c}|"' - matches \, then all'
+echo '${a##\\\$c} removes nothing: '"|${a##\\\$c}|"' - matches \, but then second char is not $'
echo '${a##\\"$c"} removes \*: '"|${a##\\"$c"}|"' - matches \, then *'
echo '${a##$b} removes \: '"|${a##$b}|"' - matches \'
echo '${a##"$b"} removes \: '"|${a##"$b"}|"' - matches \'
shell/hush_test/hush-bugs/var_backslash1.right+3 -2
@@ -1,14 +1,15 @@
a is '\*bc'
b is '\'
c is '*'
-${a##?*} removes everything: ||
+${a##?*} removes everything: || - matches one char, then all
${a##?"*"} removes \*: |bc| - matches one char, then *
${a##\*} removes nothing: |\*bc| - first char is not *
${a##\\*} removes everything: || - matches \, then all
-${a##\\\*} removes \*: || - matches \, then *
+${a##\\\*} removes \*: |bc| - matches \, then *
${a##?$c} removes everything: || - matches one char, then all
${a##?"$c"} removes \*: |bc| - matches one char, then *
${a##\\$c} removes everything: || - matches \, then all
+${a##\\\$c} removes nothing: |\*bc| - matches \, but then second char is not $
${a##\\"$c"} removes \*: |bc| - matches \, then *
${a##$b} removes \: |*bc| - matches \
${a##"$b"} removes \: |*bc| - matches \
shell/hush_test/hush-bugs/var_backslash1.tests+3 -2
@@ -4,14 +4,15 @@ c='*'
echo "a is '$a'"
echo "b is '$b'"
echo "c is '$c'"
-echo '${a##?*} removes everything: '"|${a##?*}|"
+echo '${a##?*} removes everything: '"|${a##?*}|"' - matches one char, then all'
echo '${a##?"*"} removes \*: '"|${a##?"*"}|"' - matches one char, then *'
echo '${a##\*} removes nothing: '"|${a##\*}|"' - first char is not *'
echo '${a##\\*} removes everything: '"|${a##\\*}|"' - matches \, then all'
-echo '${a##\\\*} removes \*: '"|${a##\\*}|"' - matches \, then *'
+echo '${a##\\\*} removes \*: '"|${a##\\\*}|"' - matches \, then *'
echo '${a##?$c} removes everything: '"|${a##?$c}|"' - matches one char, then all'
echo '${a##?"$c"} removes \*: '"|${a##?"$c"}|"' - matches one char, then *'
echo '${a##\\$c} removes everything: '"|${a##\\$c}|"' - matches \, then all'
+echo '${a##\\\$c} removes nothing: '"|${a##\\\$c}|"' - matches \, but then second char is not $'
echo '${a##\\"$c"} removes \*: '"|${a##\\"$c"}|"' - matches \, then *'
echo '${a##$b} removes \: '"|${a##$b}|"' - matches \'
echo '${a##"$b"} removes \: '"|${a##"$b"}|"' - matches \'