hush: fix misparsing of "... do eval a= ...". Closes 3721
[oweals/busybox.git] / shell / hush_test / hush-misc / redir1.tests
index 5f6c20612927101868fb82a16a029d9127b8a556..ef2fbfb77b24fe4935c49836805c2dce17556106 100755 (executable)
@@ -1,3 +1,9 @@
+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_$$
@@ -19,7 +25,9 @@ test -f shell_test_$$ && echo "File created:ok"
 rm shell_test_$$ 2>/dev/null
 var=ok
 { var=bad >shell_test_$$; } &
-usleep 100000
+# 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"