summary refs log tree commit diff
path: root/bin/cash/tests/builtins/var-assign2.0
blob: ff60f72a12f35b2cffb2ded048c2c4a7eb56b363 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# $FreeBSD: releng/12.0/bin/sh/tests/builtins/var-assign2.0 213738 2010-10-12 18:20:38Z obrien $
IFS=,

SPECIAL="break,\
	:,\
	continue,\
	. /dev/null,\
	eval,\
	exec,\
	export -p,\
	readonly -p,\
	set,\
	shift 0,\
	times,\
	trap,\
	unset foo"

UTILS="alias,\
	bg,\
	bind,\
	cd,\
	command echo,\
	echo,\
	false,\
	fc -l,\
	fg,\
	getopts a var,\
	hash,\
	jobs,\
	printf a,\
	pwd,\
	read var < /dev/null,\
	test,\
	true,\
	type ls,\
	ulimit,\
	umask,\
	unalias -a,\
	wait"

set -e

# With 'command', variable assignments do not affect the shell environment.

set -- ${SPECIAL}
for cmd in "$@"
do
	${SH} -c "VAR=0; VAR=1 command ${cmd}; exit \${VAR}" >/dev/null 2>&1
done

set -- ${UTILS}
for cmd in "$@"
do
	${SH} -c "VAR=0; VAR=1 command ${cmd}; exit \${VAR}" >/dev/null 2>&1
done
follow=1'>Move C file description commentsJune McEnroe 2017-09-06Fix bin/Makefile FreeBSD compatibilityJune McEnroe 2017-09-06Remove C code from link scriptJune McEnroe 2017-09-06Move C code to bin, Makefile, AGPLJune McEnroe 2017-09-06Rename curtis -> homeJune McEnroe 2017-09-05Pass final NULL to execlpJune McEnroe 2017-09-05Add watch.cJune McEnroe 2017-09-02Remove Scala highlightingJune McEnroe 2017-08-31Fix Linux console Tarmak 3June McEnroe 2017-08-31Use Tarmak 3 on Linux consoleJune McEnroe 2017-08-25Install ddateJune McEnroe 2017-08-19Move nethack options to envJune McEnroe 2017-08-17Remove scala syntax fileJune McEnroe 2017-08-06Add wakeJune McEnroe 2017-08-04Use $() in install.shJune McEnroe 2017-08-02Create Code Tarmak 3 layoutJune McEnroe 2017-07-31Add tupJune McEnroe 2017-07-31Use designated initializer for hnel tableJune McEnroe 2017-07-30Add juneJune McEnroe 2017-07-30Play nethack as ValkyrieJune McEnroe 2017-07-28Add toggle to hnelJune McEnroe 2017-07-28Install slJune McEnroe 2017-07-25Add up, supJune McEnroe 2017-07-24Autopickup ringsJune McEnroe 2017-07-24Name dogJune McEnroe 2017-07-23Add nethackrcJune McEnroe 2017-07-23Remove useless setuid in briJune McEnroe 2017-07-23Clean up hnel a tiny bitJune McEnroe 2017-07-21Set window size in hnelJune McEnroe 2017-07-21Add hnelJune McEnroe 2017-07-19chmod 600 in dtchJune McEnroe