1157600Sstefanf# $FreeBSD: releng/11.0/bin/sh/tests/builtins/var-assign.0 213738 2010-10-12 18:20:38Z obrien $
2157600SstefanfIFS=,
3157600Sstefanf
4157600SstefanfSPECIAL="break,\
5157600Sstefanf	:,\
6157600Sstefanf	continue,\
7157600Sstefanf	. /dev/null,
8157600Sstefanf	eval,
9157600Sstefanf	exec,
10157600Sstefanf	export -p,
11157600Sstefanf	readonly -p,
12157600Sstefanf	set,
13157600Sstefanf	shift 0,
14157600Sstefanf	times,
15157600Sstefanf	trap,
16157600Sstefanf	unset foo"
17157600Sstefanf
18157600SstefanfUTILS="alias,\
19157600Sstefanf	bg,\
20157600Sstefanf	bind,\
21157600Sstefanf	cd,\
22157600Sstefanf	command echo,\
23157600Sstefanf	echo,\
24157600Sstefanf	false,\
25157600Sstefanf	fc -l,\
26157600Sstefanf	fg,\
27157600Sstefanf	getopts a var,\
28157600Sstefanf	hash,\
29157600Sstefanf	jobs,\
30157600Sstefanf	printf a,\
31157600Sstefanf	pwd,\
32157600Sstefanf	read var < /dev/null,\
33157600Sstefanf	test,\
34157600Sstefanf	true,\
35157600Sstefanf	type ls,\
36157600Sstefanf	ulimit,\
37157600Sstefanf	umask,\
38157600Sstefanf	unalias -a,\
39157600Sstefanf	wait"
40157600Sstefanf
41157600Sstefanfset -e
42157600Sstefanf
43157600Sstefanf# For special built-ins variable assignments affect the shell environment.
44157600Sstefanfset -- ${SPECIAL}
45157600Sstefanffor cmd in "$@"
46157600Sstefanfdo
47213738Sobrien	${SH} -c "VAR=1; VAR=0 ${cmd}; exit \${VAR}" >/dev/null 2>&1
48157600Sstefanfdone
49157600Sstefanf
50157600Sstefanf# For other built-ins and utilites they do not.
51157600Sstefanfset -- ${UTILS}
52157600Sstefanffor cmd in "$@"
53157600Sstefanfdo
54213738Sobrien	${SH} -c "VAR=0; VAR=1 ${cmd}; exit \${VAR}" >/dev/null 2>&1
55157600Sstefanfdone
56