aboutsummaryrefslogtreecommitdiffstats
path: root/test/gnuops3.awk
diff options
context:
space:
mode:
Diffstat (limited to 'test/gnuops3.awk')
-rw-r--r--test/gnuops3.awk14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/gnuops3.awk b/test/gnuops3.awk
new file mode 100644
index 00000000..bcd40aa1
--- /dev/null
+++ b/test/gnuops3.awk
@@ -0,0 +1,14 @@
+# Mon Jan 31 09:57:30 IST 2005
+# test both dfa and regex matchers on \B
+# tests from Stepan Kasal, kasal@ucw.cz
+BEGIN {
+
+ print (" " ~ / \B /) # test dfa matcher
+ print ("a b" ~ /\B/)
+ print (" b" ~ /\B/)
+ print ("a " ~ /\B/)
+
+ a = " "
+ gsub(/\B/, "x", a) # test regex matcher
+ print a
+}