busybox/shell/ash_test/ash-vars/var_posix1.tests
Denys Vlasenko e3354bc44a ash testsuite: update some of variable tests with newer versions from hush
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2016-10-02 18:08:04 +02:00

53 lines
793 B
Plaintext
Executable File

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}
echo ${var##ab}
echo ${var#a*b}
echo ${var##a*b}
echo ${var#?}
echo ${var##?}
echo ${var#*}
echo Empty:${var##*}
echo ${var#}}_tail
echo ${var#\}}_tail
echo ${var%cd}
echo ${var%%cd}
echo ${var%c*d}
echo ${var%%c*d}
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