]>
Commit | Line | Data |
---|---|---|
deb63bfb | 1 | # $FreeBSD: head/bin/sh/tests/expansion/trim6.0 214524 2010-10-29 19:34:57Z jilles $ |
71aad674 A |
2 | |
3 | e= | |
4 | for i in 0 1 2 3; do | |
5 | for j in 0 1 2 3 4 5 6 7; do | |
6 | for k in 0 1 2 3 4 5 6 7; do | |
7 | case $i$j$k in | |
8 | 000) continue ;; | |
9 | esac | |
10 | e="$e\\$i$j$k" | |
11 | done | |
12 | done | |
13 | done | |
14 | e=$(printf "$e") | |
15 | v=@$e@$e@ | |
16 | y=${v##*"$e"} | |
17 | yq="${v##*"$e"}" | |
18 | [ "$y" = @ ] || echo "error when unquoted in non-splitting context" | |
19 | [ "$yq" = @ ] || echo "error when quoted in non-splitting context" | |
20 | [ "${v##*"$e"}" = @ ] || echo "error when quoted in splitting context" | |
21 | IFS= | |
22 | [ ${v##*"$e"} = @ ] || echo "error when unquoted in splitting context" |