diff options
Diffstat (limited to 'shell/hush_test/hush-vars/var_bash5.tests')
-rwxr-xr-x | shell/hush_test/hush-vars/var_bash5.tests | 24 |
1 files changed, 21 insertions, 3 deletions
diff --git a/shell/hush_test/hush-vars/var_bash5.tests b/shell/hush_test/hush-vars/var_bash5.tests index 7f482a5..5748b4a 100755 --- a/shell/hush_test/hush-vars/var_bash5.tests +++ b/shell/hush_test/hush-vars/var_bash5.tests @@ -4,8 +4,26 @@ v='a/b/c' s='b/c' r='e/f' -echo "${v/$s}" -echo "${v/$s/d}" -echo "${v/$s/$r}" +echo "1 ${v/$s}" +echo "2 ${v/$s/d}" +echo "3 ${v/$s/$r}" + +v='a\b\c' +s='b\\c' +r='e\f' +echo "4 ${v/$s}" +echo "5 ${v/$s/d}" +echo "6 ${v/$s/$r}" + +v='a\\b\\c' +s='b\\\\c' +r='e\\f' +echo "7 ${v/$s}" +echo "8 ${v/$s/d}" +echo "9 ${v/$s/$r}" + +v='a-$a-\t-\\-\"-\`-\--\z-\*-\?-b' +s='-$a-\\t-\\\\-\\"-\\`-\\--\\z-\\\*-\\\?-' +echo "a ${v/$s}" echo Done: $? |