Welcome to mirror list, hosted at ThFree Co, Russian Federation.

arith.right « ash-arith « ash_test « shell - git.busybox.net/busybox.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: b2c3f56d8e9d85b11ed7b95f63fdd1c9605308c3 (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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
Format: 'expected actual'
163 163
4 4
16 16
8 8
2 2
4 4
2 2
2 2
1 1
0 0
0 0
0 0
1 1
1 1
2 2
-3 -3
-2 -2
1 1
0 0
2 2
131072 131072
29 29
33 33
49 49
1 1
1 1
0 0
0 0
1 1
1 1
1 1
2 2
3 3
1 1
58 58
2 2
60 60
1 1
256 256
16 16
62 62
4 4
29 29
5 5
unary plus, minus
-4 -4
4 4
conditional expressions
1 1
32 32
32 32
1 1
1 1
32 32
check that the unevaluated part of the ternary operator does not do evaluation or assignment
20 20
30 30
20 20
30 30
check precedence of assignment vs. conditional operator
./arith.tests: line 116: arithmetic syntax error
check precedence of assignment vs. conditional operator
associativity of assignment-operator operator
6 6
6,5,3 6,5,3
octal, hex
263 263
255 255
40 40
other bases
10 10
10 10
10 10
10 10
10 10
10 10
36 36
36 36
62 62
63 63
missing number after base
./arith.tests: line 161: arithmetic syntax error
./arith.tests: line 162: arithmetic syntax error
./arith.tests: line 163: arithmetic syntax error
./arith.tests: line 164: divide by zero
./arith.tests: let: line 165: arithmetic syntax error
./arith.tests: line 166: arithmetic syntax error
./arith.tests: let: line 167: arithmetic syntax error
abc
def
ghi
./arith.tests: line 190: arithmetic syntax error
16 16
./arith.tests: line 195: arithmetic syntax error
./arith.tests: line 196: arithmetic syntax error
./arith.tests: line 197: arithmetic syntax error
9 9
./arith.tests: line 204: arithmetic syntax error
./arith.tests: line 207: arithmetic syntax error
9 9
9 9
9 9
7 7
7
4 4
32767 32767
32768 32768
131072 131072
2147483647 2147483647
1 1
4 4
4 4
5 5
5 5
4 4
3 3
3 3
4 4
4 4
7 7
./arith.tests: line 256: arithmetic syntax error
./arith.tests: line 258: arithmetic syntax error
./arith.tests: line 259: arithmetic syntax error
./arith.tests: line 261: arithmetic syntax error
./arith.tests: line 262: arithmetic syntax error
4 4
7 7
-7 -7
7
7
./arith1.sub: line 2: arithmetic syntax error
./arith1.sub: line 3: arithmetic syntax error
./arith1.sub: line 4: arithmetic syntax error
./arith1.sub: line 5: arithmetic syntax error
6 6
3 3
7 7
4 4
0 0
3 3
7 7
2 2
-2 -2
1 1
7
7
7
7
7
7
5 5
1 1
6 6
2 2
3 3
1 1
4 4
0 0
-7
-7
7
7
-7 -7
-7 -7
7 7
7 7
8 12
./arith.tests: line 289: arithmetic syntax error
42
42
42
./arith.tests: line 301: a[b[c]d]=e: not found