1 # This set of tests exercises the serialization/deserialization and code copy
2 # functions in the library. It does not use UTF or JIT.
6 # Compile several patterns, push them onto the stack, and then write them
11 /(?<NAME>(?&NAME_PAT))\s+(?<ADDR>(?&ADDRESS_PAT))
16 /^(?:((.)(?1)\2|)|((.)(?3)\4|.))$/i
20 # Do it again for some more patterns.
22 /(*MARK:A)(*SKIP:B)(C|X)/mark
23 ** Ignored when compiled pattern is stacked with 'push': mark
24 /(?:(?<n>foo)|(?<n>bar))\k<n>/dupnames
29 # Reload the patterns, then pop them one by one and check them.
35 Capturing subpattern count = 2
36 Max back reference = 2
37 Named capturing subpatterns:
41 Starting code units: b f
42 Subject length lower bound = 6
62 0: AmanaplanacanalPanama
65 3: AmanaplanacanalPanama
69 Capturing subpattern count = 4
70 Named capturing subpatterns:
76 Subject length lower bound = 3
82 # Check for an error when different tables are used.
87 Serialization failed: error -30: patterns do not all use the same character tables
97 #pop should give an error
98 ** Can't pop off an empty stack
109 #pop should give an error
110 ** Can't pop off an empty stack
123 #pop should give an error
124 ** Can't pop off an empty stack
135 #pop should give an error
136 ** Can't pop off an empty stack
150 # Must only specify one of these
153 ** Not allowed together: push pushcopy
155 //push,pushtablescopy
156 ** Not allowed together: push pushtablescopy
158 //pushcopy,pushtablescopy
159 ** Not allowed together: pushcopy pushtablescopy