test/gnuops3.awk
raw| 1 | # Mon Jan 31 09:57:30 IST 2005 |
| 2 | # test both dfa and regex matchers on \B |
| 3 | # tests from Stepan Kasal, [email protected] |
| 4 | BEGIN { |
| 5 | |
| 6 | print (" " ~ / \B /) # test dfa matcher |
| 7 | print ("a b" ~ /\B/) |
| 8 | print (" b" ~ /\B/) |
| 9 | print ("a " ~ /\B/) |
| 10 | |
| 11 | a = " " |
| 12 | gsub(/\B/, "x", a) # test regex matcher |
| 13 | print a |
| 14 | } |