1 # $FreeBSD: head/bin/sh/tests/expansion/plus-minus4.0 211080 2010-08-08 17:03:23Z jilles $
3 # These may be a bit unclear in the POSIX spec or the proposed revisions,
4 # and conflict with bash's interpretation, but I think ksh93's interpretation
5 # makes most sense. In particular, it makes no sense to me that single-quotes
6 # must match but are not removed.
8 e= q='?' a='*' t=texttext s='ast*que?non' p='/et[c]/' w='a b c' b='{{(#)}}'
21 if [ "x$result" = "x$expected" ]; then
25 echo "For $code, expected $expected actual $result"
29 testcase 'set -- ${e:-'"'"'}'"'"'}' '1|}'
30 testcase "set -- \${e:-\\'}" "1|'"
31 testcase "set -- \${e:-\\'\\'}" "1|''"
32 testcase "set -- \"\${e:-'}\"" "1|'"
33 testcase "set -- \"\${e:-'}'}\"" "1|''}"
34 testcase "set -- \"\${e:-''}\"" "1|''"
35 testcase 'set -- ${e:-\a}' '1|a'
36 testcase 'set -- "${e:-\a}"' '1|\a'