2016-02-26 13:26:17 -05:00
|
|
|
# This set of tests exercises the serialization/deserialization and code copy
|
|
|
|
# functions in the library. It does not use UTF or JIT.
|
2015-08-18 06:34:05 -04:00
|
|
|
|
|
|
|
#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
|
2017-05-06 12:56:07 -04:00
|
|
|
foofoo
|
2015-08-18 06:34:05 -04:00
|
|
|
barbar
|
2017-05-06 12:56:07 -04:00
|
|
|
|
2015-08-18 06:34:05 -04:00
|
|
|
#pop mark
|
|
|
|
C
|
2017-05-06 12:56:07 -04:00
|
|
|
\= Expect no match
|
|
|
|
D
|
|
|
|
|
2015-08-18 06:34:05 -04:00
|
|
|
#pop
|
2017-05-06 12:56:07 -04:00
|
|
|
AmanaplanacanalPanama
|
2015-08-18 06:34:05 -04:00
|
|
|
|
|
|
|
#pop info
|
|
|
|
metcalfe 33
|
2017-05-06 12:56:07 -04:00
|
|
|
|
2015-08-18 06:34:05 -04:00
|
|
|
# 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
|
2017-05-06 12:56:07 -04:00
|
|
|
|
2016-02-26 13:26:17 -05:00
|
|
|
/abcd/pushcopy
|
|
|
|
abcd
|
2017-05-06 12:56:07 -04:00
|
|
|
|
2016-02-26 13:26:17 -05:00
|
|
|
#pop
|
2017-05-06 12:56:07 -04:00
|
|
|
abcd
|
2016-02-26 13:26:17 -05:00
|
|
|
|
|
|
|
#pop should give an error
|
|
|
|
|
|
|
|
/abcd/push
|
|
|
|
#popcopy
|
|
|
|
abcd
|
2017-05-06 12:56:07 -04:00
|
|
|
|
2016-02-26 13:26:17 -05:00
|
|
|
#pop
|
2017-05-06 12:56:07 -04:00
|
|
|
abcd
|
|
|
|
|
2016-02-26 13:26:17 -05:00
|
|
|
/abcd/push
|
|
|
|
#save testsaved1
|
|
|
|
#pop should give an error
|
|
|
|
|
|
|
|
#load testsaved1
|
2017-05-06 12:56:07 -04:00
|
|
|
#popcopy
|
2016-02-26 13:26:17 -05:00
|
|
|
abcd
|
2017-05-06 12:56:07 -04:00
|
|
|
|
2016-02-26 13:26:17 -05:00
|
|
|
#pop
|
|
|
|
abcd
|
|
|
|
|
|
|
|
#pop should give an error
|
2015-08-18 06:34:05 -04:00
|
|
|
|
2016-11-22 10:37:02 -05:00
|
|
|
/abcd/pushtablescopy
|
|
|
|
abcd
|
|
|
|
|
2017-05-06 12:56:07 -04:00
|
|
|
#popcopy
|
2016-11-22 10:37:02 -05:00
|
|
|
abcd
|
2017-05-06 12:56:07 -04:00
|
|
|
|
2016-11-22 10:37:02 -05:00
|
|
|
#pop
|
2017-05-06 12:56:07 -04:00
|
|
|
abcd
|
|
|
|
|
|
|
|
# Must only specify one of these
|
|
|
|
|
|
|
|
//push,pushcopy
|
|
|
|
|
|
|
|
//push,pushtablescopy
|
|
|
|
|
|
|
|
//pushcopy,pushtablescopy
|
2016-11-22 10:37:02 -05:00
|
|
|
|
2015-08-18 06:34:05 -04:00
|
|
|
# End of testinput20
|