blob: 5f6c20612927101868fb82a16a029d9127b8a556 [file] [log] [blame]
Denis Vlasenko552433b2009-04-04 19:29:21 +00001rm shell_test_$$ 2>/dev/null
2var=bad
3var=ok >shell_test_$$
4echo "Test 1: var:$var"
5test -f shell_test_$$ && echo "File created:ok"
6
7rm shell_test_$$ 2>/dev/null
8var=ok
9true | var=bad >shell_test_$$
10echo "Test 2: var:$var"
11test -f shell_test_$$ && echo "File created:ok"
12
13rm shell_test_$$ 2>/dev/null
14var=bad
15{ var=ok >shell_test_$$; }
16echo "Test 3: var:$var"
17test -f shell_test_$$ && echo "File created:ok"
18
19rm shell_test_$$ 2>/dev/null
20var=ok
21{ var=bad >shell_test_$$; } &
22usleep 100000
23echo "Test 4: var:$var"
24test -f shell_test_$$ && echo "File created:ok"
25
26rm shell_test_$$ 2>/dev/null
27var=ok
28( var=bad >shell_test_$$ )
29echo "Test 5: var:$var"
30test -f shell_test_$$ && echo "File created:ok"
31
32rm shell_test_$$ 2>/dev/null