| 1 | [[test]] |
| 2 | name = "no-greedy-100" |
| 3 | regex = 'a+' |
| 4 | haystack = "aaa" |
| 5 | matches = [[0, 1], [1, 2], [2, 3]] |
| 6 | search-kind = "earliest" |
| 7 | |
| 8 | [[test]] |
| 9 | name = "no-greedy-200" |
| 10 | regex = 'abc+' |
| 11 | haystack = "zzzabccc" |
| 12 | matches = [[3, 6]] |
| 13 | search-kind = "earliest" |
| 14 | |
| 15 | [[test]] |
| 16 | name = "is-ungreedy" |
| 17 | regex = 'a+?' |
| 18 | haystack = "aaa" |
| 19 | matches = [[0, 1], [1, 2], [2, 3]] |
| 20 | search-kind = "earliest" |
| 21 | |
| 22 | [[test]] |
| 23 | name = "look-start-test" |
| 24 | regex = '^(abc|a)' |
| 25 | haystack = "abc" |
| 26 | matches = [ |
| 27 | [[0, 1], [0, 1]], |
| 28 | ] |
| 29 | search-kind = "earliest" |
| 30 | |
| 31 | [[test]] |
| 32 | name = "look-end-test" |
| 33 | regex = '(abc|a)$' |
| 34 | haystack = "abc" |
| 35 | matches = [ |
| 36 | [[0, 3], [0, 3]], |
| 37 | ] |
| 38 | search-kind = "earliest" |
| 39 | |
| 40 | [[test]] |
| 41 | name = "no-leftmost-first-100" |
| 42 | regex = 'abc|a' |
| 43 | haystack = "abc" |
| 44 | matches = [[0, 1]] |
| 45 | search-kind = "earliest" |
| 46 | |
| 47 | [[test]] |
| 48 | name = "no-leftmost-first-200" |
| 49 | regex = 'aba|a' |
| 50 | haystack = "aba" |
| 51 | matches = [[0, 1], [2, 3]] |
| 52 | search-kind = "earliest" |