diff options
Diffstat (limited to 'testsuite/awk.tests')
-rwxr-xr-x | testsuite/awk.tests | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/testsuite/awk.tests b/testsuite/awk.tests index 6af6072b8..132afc6a9 100755 --- a/testsuite/awk.tests +++ b/testsuite/awk.tests | |||
@@ -269,10 +269,31 @@ testing "awk FS assignment" "awk '{FS=\":\"; print \$1}'" \ | |||
269 | "" \ | 269 | "" \ |
270 | "a:b c:d\ne:f g:h" | 270 | "a:b c:d\ne:f g:h" |
271 | 271 | ||
272 | optional FEATURE_AWK_LIBM | ||
272 | testing "awk large integer" \ | 273 | testing "awk large integer" \ |
273 | "awk 'BEGIN{n=(2^31)-1; print n, int(n), n%1, ++n, int(n), n%1}'" \ | 274 | "awk 'BEGIN{n=(2^31)-1; print n, int(n), n%1, ++n, int(n), n%1}'" \ |
274 | "2147483647 2147483647 0 2147483648 2147483648 0\n" \ | 275 | "2147483647 2147483647 0 2147483648 2147483648 0\n" \ |
275 | "" "" | 276 | "" "" |
277 | SKIP= | ||
278 | |||
279 | testing "awk length(array)" \ | ||
280 | "awk 'BEGIN{ A[1]=2; A[\"qwe\"]=\"asd\"; print length(A)}'" \ | ||
281 | "2\n" \ | ||
282 | "" "" | ||
283 | |||
284 | testing "awk -f and ARGC" \ | ||
285 | "awk -f - input" \ | ||
286 | "re\n2\n" \ | ||
287 | "do re mi\n" \ | ||
288 | '{print $2; print ARGC;}' \ | ||
289 | |||
290 | optional FEATURE_AWK_GNU_EXTENSIONS | ||
291 | testing "awk -e and ARGC" \ | ||
292 | "awk -e '{print \$2; print ARGC;}' input" \ | ||
293 | "re\n2\n" \ | ||
294 | "do re mi\n" \ | ||
295 | "" | ||
296 | SKIP= | ||
276 | 297 | ||
277 | # testing "description" "command" "result" "infile" "stdin" | 298 | # testing "description" "command" "result" "infile" "stdin" |
278 | 299 | ||