summaryrefslogtreecommitdiff
path: root/testdata/testinput20
blob: 71f39ae300338bbe7a90be8591e2aae21923b802 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
# This set of tests exercises the serialization/deserialization and code copy
# 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

/abcd/pushcopy
    abcd

#pop
    abcd

#pop should give an error

/abcd/push
#popcopy
    abcd

#pop
    abcd

/abcd/push
#save testsaved1
#pop should give an error

#load testsaved1
#popcopy
    abcd

#pop
    abcd

#pop should give an error

/abcd/pushtablescopy
    abcd

#popcopy
    abcd

#pop
    abcd

# Must only specify one of these

//push,pushcopy

//push,pushtablescopy

//pushcopy,pushtablescopy

# End of testinput20