2009-04-10 05:50:58 +05:30
|
|
|
rm shell_test_$$ 2>/dev/null
|
|
|
|
var=bad
|
|
|
|
>shell_test_$$ var=ok
|
|
|
|
echo "Test 0: var:$var"
|
|
|
|
test -f shell_test_$$ && echo "File created:ok"
|
|
|
|
|
2009-04-05 00:59:21 +05:30
|
|
|
rm shell_test_$$ 2>/dev/null
|
|
|
|
var=bad
|
|
|
|
var=ok >shell_test_$$
|
|
|
|
echo "Test 1: var:$var"
|
|
|
|
test -f shell_test_$$ && echo "File created:ok"
|
|
|
|
|
|
|
|
rm shell_test_$$ 2>/dev/null
|
|
|
|
var=ok
|
|
|
|
true | var=bad >shell_test_$$
|
|
|
|
echo "Test 2: var:$var"
|
|
|
|
test -f shell_test_$$ && echo "File created:ok"
|
|
|
|
|
|
|
|
rm shell_test_$$ 2>/dev/null
|
|
|
|
var=bad
|
|
|
|
{ var=ok >shell_test_$$; }
|
|
|
|
echo "Test 3: var:$var"
|
|
|
|
test -f shell_test_$$ && echo "File created:ok"
|
|
|
|
|
|
|
|
rm shell_test_$$ 2>/dev/null
|
|
|
|
var=ok
|
|
|
|
{ var=bad >shell_test_$$; } &
|
2009-04-06 18:04:27 +05:30
|
|
|
# cant use usleep as it isnt standard in $PATH --
|
|
|
|
# we fail when testing busybox compiled solely as "hush"
|
2009-04-10 17:33:20 +05:30
|
|
|
wait
|
2009-04-05 00:59:21 +05:30
|
|
|
echo "Test 4: var:$var"
|
|
|
|
test -f shell_test_$$ && echo "File created:ok"
|
|
|
|
|
|
|
|
rm shell_test_$$ 2>/dev/null
|
|
|
|
var=ok
|
|
|
|
( var=bad >shell_test_$$ )
|
|
|
|
echo "Test 5: var:$var"
|
|
|
|
test -f shell_test_$$ && echo "File created:ok"
|
|
|
|
|
|
|
|
rm shell_test_$$ 2>/dev/null
|