aboutsummaryrefslogtreecommitdiff
path: root/shell/hush_test/hush-misc/redir1.tests
blob: 5f6c20612927101868fb82a16a029d9127b8a556 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
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_$$; } &
usleep 100000
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