| 1 |
[[test]] |
| 2 |
name = "invalid-utf8-literal1" |
| 3 |
regex = '\xFF' |
| 4 |
haystack = '\xFF' |
| 5 |
matches = [[0, 1]] |
| 6 |
unicode = false |
| 7 |
utf8 = false |
| 8 |
unescape = true |
| 9 |
|
| 10 |
|
| 11 |
[[test]] |
| 12 |
name = "mixed" |
| 13 |
regex = '(?:.+)(?-u)(?:.+)' |
| 14 |
haystack = '\xCE\x93\xCE\x94\xFF' |
| 15 |
matches = [[0, 5]] |
| 16 |
utf8 = false |
| 17 |
unescape = true |
| 18 |
|
| 19 |
|
| 20 |
[[test]] |
| 21 |
name = "case1" |
| 22 |
regex = "a" |
| 23 |
haystack = "A" |
| 24 |
matches = [[0, 1]] |
| 25 |
case-insensitive = true |
| 26 |
unicode = false |
| 27 |
|
| 28 |
[[test]] |
| 29 |
name = "case2" |
| 30 |
regex = "[a-z]+" |
| 31 |
haystack = "AaAaA" |
| 32 |
matches = [[0, 5]] |
| 33 |
case-insensitive = true |
| 34 |
unicode = false |
| 35 |
|
| 36 |
[[test]] |
| 37 |
name = "case3" |
| 38 |
regex = "[a-z]+" |
| 39 |
haystack = "aA\u212AaA" |
| 40 |
matches = [[0, 7]] |
| 41 |
case-insensitive = true |
| 42 |
|
| 43 |
[[test]] |
| 44 |
name = "case4" |
| 45 |
regex = "[a-z]+" |
| 46 |
haystack = "aA\u212AaA" |
| 47 |
matches = [[0, 2], [5, 7]] |
| 48 |
case-insensitive = true |
| 49 |
unicode = false |
| 50 |
|
| 51 |
|
| 52 |
[[test]] |
| 53 |
name = "negate1" |
| 54 |
regex = "[^a]" |
| 55 |
haystack = "δ" |
| 56 |
matches = [[0, 2]] |
| 57 |
|
| 58 |
[[test]] |
| 59 |
name = "negate2" |
| 60 |
regex = "[^a]" |
| 61 |
haystack = "δ" |
| 62 |
matches = [[0, 1], [1, 2]] |
| 63 |
unicode = false |
| 64 |
utf8 = false |
| 65 |
|
| 66 |
|
| 67 |
[[test]] |
| 68 |
name = "dotstar-prefix1" |
| 69 |
regex = "a" |
| 70 |
haystack = '\xFFa' |
| 71 |
matches = [[1, 2]] |
| 72 |
unicode = false |
| 73 |
utf8 = false |
| 74 |
unescape = true |
| 75 |
|
| 76 |
[[test]] |
| 77 |
name = "dotstar-prefix2" |
| 78 |
regex = "a" |
| 79 |
haystack = '\xFFa' |
| 80 |
matches = [[1, 2]] |
| 81 |
utf8 = false |
| 82 |
unescape = true |
| 83 |
|
| 84 |
|
| 85 |
[[test]] |
| 86 |
name = "null-bytes1" |
| 87 |
regex = '[^\x00]+\x00' |
| 88 |
haystack = 'foo\x00' |
| 89 |
matches = [[0, 4]] |
| 90 |
unicode = false |
| 91 |
utf8 = false |
| 92 |
unescape = true |
| 93 |
|
| 94 |
|
| 95 |
[[test]] |
| 96 |
name = "word-ascii" |
| 97 |
regex = '\w+' |
| 98 |
haystack = "aδ" |
| 99 |
matches = [[0, 1]] |
| 100 |
unicode = false |
| 101 |
|
| 102 |
[[test]] |
| 103 |
name = "word-unicode" |
| 104 |
regex = '\w+' |
| 105 |
haystack = "aδ" |
| 106 |
matches = [[0, 3]] |
| 107 |
|
| 108 |
[[test]] |
| 109 |
name = "decimal-ascii" |
| 110 |
regex = '\d+' |
| 111 |
haystack = "1२३9" |
| 112 |
matches = [[0, 1], [7, 8]] |
| 113 |
unicode = false |
| 114 |
|
| 115 |
[[test]] |
| 116 |
name = "decimal-unicode" |
| 117 |
regex = '\d+' |
| 118 |
haystack = "1२३9" |
| 119 |
matches = [[0, 8]] |
| 120 |
|
| 121 |
[[test]] |
| 122 |
name = "space-ascii" |
| 123 |
regex = '\s+' |
| 124 |
haystack = " \u1680" |
| 125 |
matches = [[0, 1]] |
| 126 |
unicode = false |
| 127 |
|
| 128 |
[[test]] |
| 129 |
name = "space-unicode" |
| 130 |
regex = '\s+' |
| 131 |
haystack = " \u1680" |
| 132 |
matches = [[0, 4]] |
| 133 |
|
| 134 |
|
| 135 |
[[test]] |
| 136 |
|
| 137 |
name = "iter1-bytes" |
| 138 |
regex = '' |
| 139 |
haystack = "☃" |
| 140 |
matches = [[0, 0], [1, 1], [2, 2], [3, 3]] |
| 141 |
utf8 = false |
| 142 |
|
| 143 |
[[test]] |
| 144 |
|
| 145 |
name = "iter1-utf8" |
| 146 |
regex = '' |
| 147 |
haystack = "☃" |
| 148 |
matches = [[0, 0], [3, 3]] |
| 149 |
|
| 150 |
[[test]] |
| 151 |
|
| 152 |
|
| 153 |
name = "iter2-bytes" |
| 154 |
regex = '' |
| 155 |
haystack = 'b\xFFr' |
| 156 |
matches = [[0, 0], [1, 1], [2, 2], [3, 3]] |
| 157 |
unescape = true |
| 158 |
utf8 = false |
| 159 |
|
| 160 |
|
| 161 |
|
| 162 |
|
| 163 |
|
| 164 |
|
| 165 |
|
| 166 |
|
| 167 |
|
| 168 |
|
| 169 |
|
| 170 |
|
| 171 |
|
| 172 |
|
| 173 |
|
| 174 |
|
| 175 |
|
| 176 |
|
| 177 |
|
| 178 |
|
| 179 |
|
| 180 |
|
| 181 |
|
| 182 |
|
| 183 |
[[test]] |
| 184 |
name = "unanchored-invalid-utf8-match-100" |
| 185 |
regex = '[a-z]' |
| 186 |
haystack = '\xFFa\xFF' |
| 187 |
matches = [[1, 2]] |
| 188 |
unescape = true |
| 189 |
utf8 = false |
| 190 |
|
| 191 |
|
| 192 |
|
| 193 |
|
| 194 |
|
| 195 |
[[test]] |
| 196 |
name = "unanchored-invalid-utf8-nomatch" |
| 197 |
regex = '^(?s:.)*?[a-z]' |
| 198 |
haystack = '\xFFa\xFF' |
| 199 |
matches = [] |
| 200 |
unescape = true |
| 201 |
utf8 = false |
| 202 |
|
| 203 |
|
| 204 |
|
| 205 |
|
| 206 |
|
| 207 |
|
| 208 |
|
| 209 |
|
| 210 |
|
| 211 |
|
| 212 |
|
| 213 |
|
| 214 |
|
| 215 |
[[test]] |
| 216 |
name = "anchored-iter-empty-utf8" |
| 217 |
regex = '' |
| 218 |
haystack = 'a☃z' |
| 219 |
matches = [[0, 0], [1, 1]] |
| 220 |
unescape = false |
| 221 |
utf8 = true |
| 222 |
anchored = true |