mirror of
https://github.com/sheumann/hush.git
synced 2024-08-14 11:28:58 +00:00
Add TODOs. Disable redir4.right part where we differ from bash. It is not a bug per standards. Add a few tests, one is in hush-bugs section: and_or_and_backgrounding.right. It will likely bite users in real world usage.
41 lines
962 B
Plaintext
Executable File
41 lines
962 B
Plaintext
Executable File
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"
|
|
|
|
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_$$; } &
|
|
# cant use usleep as it isnt standard in $PATH --
|
|
# we fail when testing busybox compiled solely as "hush"
|
|
wait
|
|
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
|