projects
/
oweals
/
busybox.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
ash: [VAR] Move unsetvar functionality into setvareq
[oweals/busybox.git]
/
shell
/
hush_test
/
hush-vars
/
unset.tests
1
# check invalid options are rejected
2
# bash: in posix mode, aborts if non-interactive
3
unset -
4
echo $?
5
unset -m a b c
6
echo $?
7
8
# check funky usage
9
unset
10
echo $?
11
12
# check normal usage
13
echo ___
14
f=f g=g
15
echo $? $f $g
16
unset f
17
echo $? $f $g
18
unset g
19
echo $? $f $g
20
21
echo ___
22
f=f g=g
23
echo $? $f $g
24
unset f g
25
echo $? $f $g
26
f=f g=g
27
echo $? $f $g
28
unset -v f g
29
echo $? $f $g
30
31
# check read only vars
32
echo ___
33
f=f g=g
34
VAR_RO=1
35
readonly VAR_RO
36
unset VAR_RO
37
echo $? $f $g
38
unset f VAR_RO g
39
echo $? $f $g