Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
--- /dev/null
+Nothing:
+Nothing:
+Nothing:
+Nothing:
+Ok:0
--- /dev/null
+x=a
+echo Nothing:${x#[a\]]}
+echo Nothing:"${x#[a\]]}"
+echo Nothing:${x%[a\]]}
+echo Nothing:"${x%[a\]]}"
+echo Ok:$?
--- /dev/null
+z
+z
+y
+y
+Ok:0
--- /dev/null
+x=yz
+echo ${x#'y'}
+echo "${x#'y'}"
+echo ${x%'z'}
+echo "${x%'z'}"
+echo Ok:$?
--- /dev/null
+Nothing:
+Nothing:
+Nothing:
+Nothing:
+Ok:0
--- /dev/null
+x=a
+echo Nothing:${x#[a\]]}
+echo Nothing:"${x#[a\]]}"
+echo Nothing:${x%[a\]]}
+echo Nothing:"${x%[a\]]}"
+echo Ok:$?
--- /dev/null
+z
+z
+y
+y
+Ok:0
--- /dev/null
+x=yz
+echo ${x#'y'}
+echo "${x#'y'}"
+echo ${x%'z'}
+echo "${x%'z'}"
+echo Ok:$?