--- trunk/mkinitrd-magellan/busybox/testsuite/awk.tests 2010/04/29 20:38:48 983 +++ trunk/mkinitrd-magellan/busybox/testsuite/awk.tests 2010/05/30 11:32:42 984 @@ -3,7 +3,7 @@ # Copyright 2007 by Denys Vlasenko # Licensed under GPL v2, see file LICENSE for details. -. testing.sh +. ./testing.sh # testing "description" "command" "result" "infile" "stdin" @@ -22,6 +22,17 @@ testing "awk hex const 2" "awk '{ print or(0x80000000,1) }'" "2.14748e+09\n" "" "\n" testing "awk oct const" "awk '{ print or(01234,1) }'" "669\n" "" "\n" +# long field seps requiring regex +testing "awk long field sep" "awk -F-- '{ print NF, length(\$NF), \$NF }'" \ + "2 0 \n3 0 \n4 0 \n5 0 \n" \ + "" \ + "a--\na--b--\na--b--c--\na--b--c--d--" + +# '@(samp|code|file)\{' is an invalid extended regex (unmatched '{'), +# but gawk 3.1.5 does not bail out on it. +testing "awk gsub falls back to non-extended-regex" \ + "awk 'gsub(\"@(samp|code|file)\{\",\"\");'; echo \$?" "0\n" "" "Hi\n" + tar xjf awk_t1.tar.bz2 testing "awk 'gcc build bug'" \ "awk -f awk_t1_opt-functions.awk -f awk_t1_opth-gen.awk