1# $FreeBSD: head/bin/sh/tests/expansion/trim6.0 214524 2010-10-29 19:34:57Z jilles $
2
3e=
4for 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
13done
14e=$(printf "$e")
15v=@$e@$e@
16y=${v##*"$e"}
17yq="${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"
21IFS=
22[ ${v##*"$e"} = @ ] || echo "error when unquoted in splitting context"
23