]> git.saurik.com Git - apple/shell_cmds.git/blob - sh/tests/builtins/command8.0
shell_cmds-207.100.1.tar.gz
[apple/shell_cmds.git] / sh / tests / builtins / command8.0
1 # $FreeBSD: head/bin/sh/tests/builtins/command8.0 213738 2010-10-12 18:20:38Z obrien $
2 IFS=,
3
4 SPECIAL="break,\
5 :,\
6 continue,\
7 . /dev/null,\
8 eval,\
9 exec,\
10 export -p,\
11 readonly -p,\
12 set,\
13 shift 0,\
14 times,\
15 trap,\
16 unset foo"
17
18 set -e
19
20 # Check that special builtins can be executed via "command".
21
22 set -- ${SPECIAL}
23 for cmd in "$@"
24 do
25 ${SH} -c "v=:; while \$v; do v=false; command ${cmd}; done" >/dev/null
26 done
27
28 while :; do
29 command break
30 echo Error on line $LINENO
31 done
32
33 set p q r
34 command shift 2
35 if [ $# -ne 1 ]; then
36 echo Error on line $LINENO
37 fi
38
39 (
40 command exec >/dev/null
41 echo Error on line $LINENO
42 )
43
44 set +e
45 ! command shift 2 2>/dev/null