ash: add testsuite entry for POSIX-mandated ${var#word} ${var##word}

${var%word} ${var%%word}
This commit is contained in:
Denis Vlasenko 2008-04-12 22:55:33 +00:00
parent 9bc80d7062
commit 033424a213
2 changed files with 23 additions and 0 deletions

View File

@ -0,0 +1,10 @@
abcdcd
abcdcd
abcdcd
cdcd
babcdcd
ababcd
ababcd
ababcd
abab
ababcdc

View File

@ -0,0 +1,13 @@
var=ababcdcd
echo ${var#ab}
echo ${var#a*b}
echo ${var##ab}
echo ${var##a*b}
echo ${var#?}
echo ${var%cd}
echo ${var%c*d}
echo ${var%%cd}
echo ${var%%c*d}
echo ${var%?}