blob: 033b35250c1cd94e34e3afedb24c4d583bf6b680 [file] [log] [blame]
Denys Vlasenkoa62bc802016-10-03 00:06:55 +02001# Assignments after some keywords should still work
2
3if a=1 true; then a=1 true; elif a=1 true; then a=1 true; else a=1 true; fi
4echo if1:$?
5while a=1 true; do a=1 true; break; done
6echo while1:$?
7until a=1 false; do a=1 true; break; done
8echo until1:$?
9
10if a=1 true
11 then a=1 true
12 elif a=1 true
13 then a=1 true
14 else a=1 true
15 fi
16echo if2:$?
17while a=1 true
18 do a=1 true
19 break
20 done
21echo while2:$?
22until a=1 false
23 do a=1 true
24 break
25 done
26echo until2:$?
27
28if
29 a=1 true; then
30 a=1 true; elif
31 a=1 true; then
32 a=1 true; else
33 a=1 true; fi
34echo if3:$?
35while
36 a=1 true; do
37 a=1 true; break; done
38echo while3:$?
39until
40 a=1 false; do
41 a=1 true; break; done
42echo until3:$?