Ignore:
Timestamp:
Jan 1, 2014, 12:47:38 AM (10 years ago)
Author:
Bruno Cornec
Message:
  • Update mindi-busybox to 1.21.1
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/3.2/mindi-busybox/testsuite/awk.tests

    r2725 r3232  
    1717testing "awk -F case 7" "awk -F '[#]' '{ print NF }'" "5\n" "" "z##abc##zz\n"
    1818
     19# conditions and operators
     20testing "awk if operator == "  "awk 'BEGIN{if(23==23) print \"foo\"}'" "foo\n" "" ""
     21testing "awk if operator != "  "awk 'BEGIN{if(23!=23) print \"bar\"}'" ""      "" ""
     22testing "awk if operator >= "  "awk 'BEGIN{if(23>=23) print \"foo\"}'" "foo\n" "" ""
     23testing "awk if operator < "   "awk 'BEGIN{if(2 < 13) print \"foo\"}'" "foo\n" "" ""
     24testing "awk if string == "    "awk 'BEGIN{if(\"a\"==\"ab\") print \"bar\"}'" "" "" ""
     25
    1926# 4294967295 = 0xffffffff
    2027testing "awk bitwise op"  "awk '{ print or(4294967295,1) }'" "4.29497e+09\n" "" "\n"
     
    3643    "" \
    3744    "a--\na--b--\na--b--c--\na--b--c--d--"
     45
     46testing "awk -F handles escapes" "awk -F'\\x21' '{print \$1}'" \
     47    "a\n" \
     48    "" \
     49    "a!b\n"
    3850
    3951# '@(samp|code|file)\{' is an invalid extended regex (unmatched '{'),
     
    203215    "" ""
    204216
     217testing "awk handles empty ()" \
     218    "awk 'BEGIN {print()}' 2>&1" "awk: cmd. line:1: Empty sequence\n" "" ""
     219
     220testing "awk FS assignment" "awk '{FS=\":\"; print \$1}'" \
     221    "a:b\ne\n" \
     222    "" \
     223    "a:b c:d\ne:f g:h"
     224
     225# testing "description" "command" "result" "infile" "stdin"
     226
    205227exit $FAILCOUNT
Note: See TracChangeset for help on using the changeset viewer.