From 64925384c9cf5e0d986e183577da286bb3207ce7 Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Tue, 25 Jul 2017 14:55:05 +0200 Subject: ash: add a few tests from hush-vars/* Signed-off-by: Denys Vlasenko --- .../ash-vars/param_expand_bash_substring.right | 64 ++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 shell/ash_test/ash-vars/param_expand_bash_substring.right (limited to 'shell/ash_test/ash-vars/param_expand_bash_substring.right') diff --git a/shell/ash_test/ash-vars/param_expand_bash_substring.right b/shell/ash_test/ash-vars/param_expand_bash_substring.right new file mode 100644 index 000000000..9ad6dbcad --- /dev/null +++ b/shell/ash_test/ash-vars/param_expand_bash_substring.right @@ -0,0 +1,64 @@ +SHELL: line 1: syntax error: bad substitution +SHELL: line 1: syntax error: bad substitution +SHELL: line 1: syntax error: bad substitution +SHELL: line 1: syntax error: bad substitution +SHELL: line 1: syntax error: missing '}' +1 =|| +1:1 =|| +1:1:2=|| +1::2 =|| +1:1: =|| +1:: =|| +1 =|0123| +1:1 =|123| +1:1:2=|12| +1::2 =|01| +1:1: =|| +1:: =|| +f =|| +f:1 =|| +f:1:2=|| +f::2 =|| +f:1: =|| +f:: =|| +f =|| +f:1 =|| +f:1:2=|| +f::2 =|| +f:1: =|| +f:: =|| +f =|a| +f:1 =|| +f:1:2=|| +f::2 =|a| +f:1: =|| +f:: =|| +f =|0123456789| +f:1 =|123456789| +f:1:2=|12| +f::2 =|01| +f:1: =|| +f:: =|| +Substrings from special vars +? =|0| +?:1 =|| +?:1:2=|| +?::2 =|0| +?:1: =|| +?:: =|| +# =|11| +#:1 =|1| +#:1:2=|1| +#::2 =|11| +#:1: =|| +#:: =|| +Substrings with expressions +f =|01234567| +f:1+1:2+2 =|2345| +f:-1:2+2 =|01234567| +f:1:f =|1234567| +f:1:$f =|1234567| +f:1:${f} =|1234567| +f:1:${f:3:1} =|123| +f:1:1`echo 1`=|1| +Done -- cgit v1.2.3