xref: /freebsd/bin/sh/tests/expansion/trim6.0 (revision a4e5e0106ac7145f56eb39a691e302cabb4635be)
1
2e=
3for i in 0 1 2 3; do
4	for j in 0 1 2 3 4 5 6 7; do
5		for k in 0 1 2 3 4 5 6 7; do
6			case $i$j$k in
7			000) continue ;;
8			esac
9			e="$e\\$i$j$k"
10		done
11	done
12done
13e=$(printf "$e")
14v=@$e@$e@
15y=${v##*"$e"}
16yq="${v##*"$e"}"
17[ "$y" = @ ] || echo "error when unquoted in non-splitting context"
18[ "$yq" = @ ] || echo "error when quoted in non-splitting context"
19[ "${v##*"$e"}" = @ ] || echo "error when quoted in splitting context"
20IFS=
21[ ${v##*"$e"} = @ ] || echo "error when unquoted in splitting context"
22