summaryrefslogtreecommitdiffstats
path: root/third_party/rust/regex/testdata/misc.toml
blob: c65531f5d9065acb51db05cb9f76548d7e321939 (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
[[test]]
name = "ascii-literal"
regex = "a"
haystack = "a"
matches = [[0, 1]]

[[test]]
name = "ascii-literal-not"
regex = "a"
haystack = "z"
matches = []

[[test]]
name = "ascii-literal-anchored"
regex = "a"
haystack = "a"
matches = [[0, 1]]
anchored = true

[[test]]
name = "ascii-literal-anchored-not"
regex = "a"
haystack = "z"
matches = []
anchored = true

[[test]]
name = "anchor-start-end-line"
regex = '(?m)^bar$'
haystack = "foo\nbar\nbaz"
matches = [[4, 7]]

[[test]]
name = "prefix-literal-match"
regex = '^abc'
haystack = "abc"
matches = [[0, 3]]

[[test]]
name = "prefix-literal-match-ascii"
regex = '^abc'
haystack = "abc"
matches = [[0, 3]]
unicode = false
utf8 = false

[[test]]
name = "prefix-literal-no-match"
regex = '^abc'
haystack = "zabc"
matches = []

[[test]]
name = "one-literal-edge"
regex = 'abc'
haystack = "xxxxxab"
matches = []

[[test]]
name = "terminates"
regex = 'a$'
haystack = "a"
matches = [[0, 1]]

[[test]]
name = "suffix-100"
regex = '.*abcd'
haystack = "abcd"
matches = [[0, 4]]

[[test]]
name = "suffix-200"
regex = '.*(?:abcd)+'
haystack = "abcd"
matches = [[0, 4]]

[[test]]
name = "suffix-300"
regex = '.*(?:abcd)+'
haystack = "abcdabcd"
matches = [[0, 8]]

[[test]]
name = "suffix-400"
regex = '.*(?:abcd)+'
haystack = "abcdxabcd"
matches = [[0, 9]]

[[test]]
name = "suffix-500"
regex = '.*x(?:abcd)+'
haystack = "abcdxabcd"
matches = [[0, 9]]

[[test]]
name = "suffix-600"
regex = '[^abcd]*x(?:abcd)+'
haystack = "abcdxabcd"
matches = [[4, 9]]