diff options
author | Denys Vlasenko | 2016-10-02 18:08:04 +0200 |
---|---|---|
committer | Denys Vlasenko | 2016-10-02 18:08:04 +0200 |
commit | e3354bc44aa92c20bec0ffdc78e6b57351e8f16d (patch) | |
tree | 5b1d0397af69b7bcd9f63d94705cfdbade01810a /shell/ash_test/ash-vars/var_posix1.tests | |
parent | c4cf542c575068d55368e771abf6c358bfebf5d3 (diff) | |
download | busybox-e3354bc44aa92c20bec0ffdc78e6b57351e8f16d.zip busybox-e3354bc44aa92c20bec0ffdc78e6b57351e8f16d.tar.gz |
ash testsuite: update some of variable tests with newer versions from hush
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'shell/ash_test/ash-vars/var_posix1.tests')
-rwxr-xr-x | shell/ash_test/ash-vars/var_posix1.tests | 37 |
1 files changed, 34 insertions, 3 deletions
diff --git a/shell/ash_test/ash-vars/var_posix1.tests b/shell/ash_test/ash-vars/var_posix1.tests index 4139e2c..82abe81 100755 --- a/shell/ash_test/ash-vars/var_posix1.tests +++ b/shell/ash_test/ash-vars/var_posix1.tests @@ -1,3 +1,25 @@ +unset var + +echo Empty:${var#} +echo Empty:${var##} +echo Empty:${var#*} +echo Empty:${var##*} +echo Empty:${var%} +echo Empty:${var%%} +echo Empty:${var%*} +echo Empty:${var%%*} + +var= + +echo Empty:${var#} +echo Empty:${var##} +echo Empty:${var#*} +echo Empty:${var##*} +echo Empty:${var%} +echo Empty:${var%%} +echo Empty:${var%*} +echo Empty:${var%%*} + var=ababcdcd echo ${var#ab} @@ -7,7 +29,9 @@ echo ${var##a*b} echo ${var#?} echo ${var##?} echo ${var#*} -echo ${var##*} +echo Empty:${var##*} +echo ${var#}}_tail +echo ${var#\}}_tail echo ${var%cd} echo ${var%%cd} @@ -16,6 +40,13 @@ echo ${var%%c*d} echo ${var%?} echo ${var%%?} echo ${var%*} -echo ${var%%*} +echo Empty:${var%%*} +echo ${var#}}_tail +echo ${var#\}}_tail +echo ${var%\\*} + +a=ab}; echo ${a%\}}; +a=abc; c=c; echo ${a%${c}} +a=ab{{c; echo ${a%`echo {{c`} -echo end +echo End |