summaryrefslogtreecommitdiff
path: root/testdata/testinput20
blob: 9ec3174a1e76d4a96d65ce418106acfa2aef33bf (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
# 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