shells: fix a typo in var_backslash1.tests, expand it while at it
No binary (build failed)
—
(log yok)
| @@ -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 \ | |
| @@ -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 \' | |
| @@ -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 \ | |
| @@ -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 \' | |