Lines Matching +full:2 +full:- +full:3

11 # 2. Redistributions in binary form must reproduce the above copyright
29 # The 2nd arg is an expected string/response from expr for that op.
31 echo "Expression '${1}', expecting '${2}'"
32 res=`eval expr $1 2>&1`
33 if [ "$res" != "$2" ]; then
34 atf_fail "Expected $2, got $res from expression: " \
41 atf_set "descr" "Test that expr(1) works with non-C LANG (PR bin/2486)"
46 atf_check -s exit:0 -o inline:"21\n" -e empty -x "expr 10 + 11"
48 export LANG=ru_RU.KOI8-R
49 atf_check -s exit:0 -o inline:"21\n" -e empty -x "expr 10 + 11"
61 test_expr '4611686018427387904 - -4611686018427387904' \
62 …"expr: integer overflow or underflow occurred for operation '4611686018427387904 - -46116860184273…
63 test_expr '-4611686018427387904 - 4611686018427387903' \
64 '-9223372036854775807'
65 test_expr '-4611686018427387904 - 4611686018427387905' \
66 …"expr: integer overflow or underflow occurred for operation '-4611686018427387904 - 46116860184273…
67 test_expr '-4611686018427387904 \* 1' '-4611686018427387904'
68 test_expr '-4611686018427387904 \* -1' '4611686018427387904'
69 test_expr '-4611686018427387904 \* 2' '-9223372036854775808'
70 test_expr '-4611686018427387904 \* 3' \
71 "expr: integer overflow or underflow occurred for operation '-4611686018427387904 * 3'"
72 test_expr '-4611686018427387904 \* -2' \
73 "expr: integer overflow or underflow occurred for operation '-4611686018427387904 * -2'"
75 test_expr '4611686018427387904 \* 2' \
76 "expr: integer overflow or underflow occurred for operation '4611686018427387904 * 2'"
77 test_expr '4611686018427387904 \* 3' \
78 "expr: integer overflow or underflow occurred for operation '4611686018427387904 * 3'"
83 atf_set "descr" "Test from gtk-- configure that cause problems on old expr"
86 test_expr '3 \> 3 \| 3 = 3 \& 4 \> 4 \| 3 = 3 \& 4 = 4 \& 5 \>= 5' '1'
87 test_expr '3 \> 3 \| 3 = 3 \& 4 \> 4 \| 3 = 3 \& 4 = 4 \& 5 \>= 6' '0'
88 test_expr '3 \> 3 \| 3 = 3 \& 4 \> 4 \| 3 = 3 \& 4 = 3 \& 5 \>= 5' '0'
89 test_expr '3 \> 3 \| 3 = 3 \& 4 \> 4 \| 3 = 2 \& 4 = 4 \& 5 \>= 5' '0'
90 test_expr '3 \> 2 \| 3 = 3 \& 4 \> 4 \| 3 = 3 \& 4 = 4 \& 5 \>= 6' '1'
91 test_expr '3 \> 3 \| 3 = 3 \& 4 \> 3 \| 3 = 3 \& 4 = 4 \& 5 \>= 5' '1'
99 test_expr '2 : 4 / 2' '0'
100 test_expr '4 : 4 % 3' '1'
114 test_expr '4 : -' '0'
124 test_expr '2 + 4 \* 5' '22'
132 test_expr '2' '2'
133 test_expr '-4' '-4'
142 test_expr '2 \> 1 \* 17' '0'
150 test_expr '2 \!= 5' '1'
151 test_expr '2 \!= 2' '0'
152 test_expr '2 \<= 3' '1'
153 test_expr '2 \<= 2' '1'
154 test_expr '2 \<= 1' '0'
155 test_expr '2 \< 3' '1'
156 test_expr '2 \< 2' '0'
157 test_expr '2 = 2' '1'
158 test_expr '2 = 4' '0'
159 test_expr '2 \>= 1' '1'
160 test_expr '2 \>= 2' '1'
161 test_expr '2 \>= 3' '0'
162 test_expr '2 \> 1' '1'
163 test_expr '2 \> 2' '0'
171 test_expr '1 \* -1' '-1'
172 test_expr '2 \> 1 \* 17' '0'
180 test_expr '-1 + 5' '4'
181 test_expr '- 1 + 5' 'expr: syntax error'
183 test_expr '5 + -1' '4'
184 test_expr '5 + - 1' 'expr: syntax error'
186 test_expr '1 - -5' '6'
194 test_expr '-3 + -1 \* 4 + 3 / -6' '-7'
203 test_expr 'X1/2/3 : X\\\(.\*[^/]\\\)//\*[^/][^/]\*/\*$ \| . : \\\(.\\\)' '1/2'
212 test_expr '1/2 : .\*/\\\(.\*\\\)' '2'