Sync /bin/sh regression tests with FreeBSD.
[dragonfly.git] / tools / regression / bin / sh / expansion / cmdsubst3.0
CommitLineData
4bfff613
PA
1# $FreeBSD: src/tools/regression/bin/sh/expansion/cmdsubst3.0,v 1.2 2011/02/18 20:37:09 jilles Exp $
2
3unset LC_ALL
4export LC_CTYPE=en_US.ISO8859-1
3df4d8b0
PA
5
6e=
7for i in 0 1 2 3; do
8 for j in 0 1 2 3 4 5 6 7; do
9 for k in 0 1 2 3 4 5 6 7; do
10 case $i$j$k in
11 000) continue ;;
12 esac
13 e="$e\n\\$i$j$k"
14 done
15 done
16done
17e1=$(printf "$e")
18e2="$(printf "$e")"
19[ "${#e1}" = 510 ] || echo length bad
20[ "$e1" = "$e2" ] || echo e1 != e2
21[ "$e1" = "$(printf "$e")" ] || echo quoted bad
22IFS=
23[ "$e1" = $(printf "$e") ] || echo unquoted bad