summaryrefslogtreecommitdiff
path: root/testdata/testinput20
diff options
context:
space:
mode:
authorMatthew Vernon <matthew@debian.org>2016-02-27 15:00:32 +0000
committerMatthew Vernon <matthew@debian.org>2016-02-27 15:00:32 +0000
commit5fc77543f854bbe609407e8f2d54d906faad2883 (patch)
tree1c6a1c13657d2b80357ea2dadd7d8b3ee5c4e493 /testdata/testinput20
parentc27ff5607e8146d7dcacf9ab7c25a931f14e1fbd (diff)
Imported Upstream version 10.21
Diffstat (limited to 'testdata/testinput20')
-rw-r--r--testdata/testinput2063
1 files changed, 63 insertions, 0 deletions
diff --git a/testdata/testinput20 b/testdata/testinput20
new file mode 100644
index 0000000..9ec3174
--- /dev/null
+++ b/testdata/testinput20
@@ -0,0 +1,63 @@
+# This set of tests exercises the serialization/deserialization functions in
+# the library. It does not use UTF or JIT.
+
+#forbid_utf
+
+# Compile several patterns, push them onto the stack, and then write them
+# all to a file.
+
+#pattern push
+
+/(?<NAME>(?&NAME_PAT))\s+(?<ADDR>(?&ADDRESS_PAT))
+ (?(DEFINE)
+ (?<NAME_PAT>[a-z]+)
+ (?<ADDRESS_PAT>\d+)
+ )/x
+/^(?:((.)(?1)\2|)|((.)(?3)\4|.))$/i
+
+#save testsaved1
+
+# Do it again for some more patterns.
+
+/(*MARK:A)(*SKIP:B)(C|X)/mark
+/(?:(?<n>foo)|(?<n>bar))\k<n>/dupnames
+
+#save testsaved2
+#pattern -push
+
+# Reload the patterns, then pop them one by one and check them.
+
+#load testsaved1
+#load testsaved2
+
+#pop info
+ foofoo
+ barbar
+
+#pop mark
+ C
+\= Expect no match
+ D
+
+#pop
+ AmanaplanacanalPanama
+
+#pop info
+ metcalfe 33
+
+# Check for an error when different tables are used.
+
+/abc/push,tables=1
+/xyz/push,tables=2
+#save testsaved1
+
+#pop
+ xyz
+
+#pop
+ abc
+
+#pop should give an error
+ pqr
+
+# End of testinput20