OLD | NEW |
1 # Copyright (c) 2001-2014 International Business Machines | 1 # Copyright (c) 2001-2014 International Business Machines |
2 # Corporation and others. All Rights Reserved. | 2 # Corporation and others. All Rights Reserved. |
3 # | 3 # |
4 # file: | 4 # file: |
5 # | 5 # |
6 # ICU regular expression test cases. | 6 # ICU regular expression test cases. |
7 # | 7 # |
8 # format: one test case per line, | 8 # format: one test case per line, |
9 # <test case> = <pattern> <flags> <match string> [# commen
t] | 9 # <test case> = <pattern> <flags> <match string> [# commen
t] |
10 # <pattern> = "<regular expression pattern>" | 10 # <pattern> = "<regular expression pattern>" |
(...skipping 1183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1194 | 1194 |
1195 # Bug 11049 | 1195 # Bug 11049 |
1196 # Edge cases in find() when pattern match begins with set of code points | 1196 # Edge cases in find() when pattern match begins with set of code points |
1197 # and the match begins at the end of the string. | 1197 # and the match begins at the end of the string. |
1198 | 1198 |
1199 "A|B|C" "hello <0>A</0>" | 1199 "A|B|C" "hello <0>A</0>" |
1200 "A|B|C" "hello \U00011234" | 1200 "A|B|C" "hello \U00011234" |
1201 "A|B|\U00012345" "hello <0>\U00012345</0>" | 1201 "A|B|\U00012345" "hello <0>\U00012345</0>" |
1202 "A|B|\U00010000" "hello \ud800" | 1202 "A|B|\U00010000" "hello \ud800" |
1203 | 1203 |
| 1204 # Bug 11369 |
| 1205 # Incorrect optimization of patterns with a zero length quantifier {0} |
| 1206 |
| 1207 "(.|b)(|b){0}\$(?#xxx){3}(?>\D*)" "AAAAABBBBBCCCCCDDDDEEEEE" |
| 1208 "(|b)ab(c)" "<0><1></1>ab<2>c</2></0>" |
| 1209 "(|b){0}a{3}(D*)" "<0>aaa<2></2></0>" |
| 1210 "(|b){0,1}a{3}(D*)" "<0><1></1>aaa<2></2></0>" |
| 1211 "((|b){0})a{3}(D*)" "<0><1></1>aaa<3></3></0>" |
| 1212 |
| 1213 # Bug 11370 |
| 1214 # Max match length computation of look-behind expression gives result that is
too big to fit in the |
| 1215 # in the 24 bit operand portion of the compiled code. Expressions should fail
to compile |
| 1216 # (Look-behind match length must be bounded. This case is treated as unbounded
, an error.) |
| 1217 |
| 1218 "(?<!(0123456789a){10000000})x" E "no match" |
| 1219 "(?<!\\ubeaf(\\ubeaf{11000}){11000})" E "no match" |
| 1220 |
| 1221 |
1204 # Random debugging, Temporary | 1222 # Random debugging, Temporary |
1205 # | 1223 # |
1206 | 1224 |
1207 "This is a string with (?:one |two |three )endings" "<0>This is a string with
two endings</0>" | 1225 "This is a string with (?:one |two |three )endings" "<0>This is a string with
two endings</0>" |
1208 | 1226 |
1209 | 1227 |
1210 # | 1228 # |
1211 # Regexps from http://www.regexlib.com | 1229 # Regexps from http://www.regexlib.com |
1212 # | 1230 # |
1213 "^[a-zA-Z]{1,2}[0-9][0-9A-Za-z]{0,1} {0,1}[0-9][A-Za-z]{2}$" G "<0>G1 1AA</0>" | 1231 "^[a-zA-Z]{1,2}[0-9][0-9A-Za-z]{0,1} {0,1}[0-9][A-Za-z]{2}$" G "<0>G1 1AA</0>" |
(...skipping 1271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2485 "(\w+)\s+\1" "may day" | 2503 "(\w+)\s+\1" "may day" |
2486 "(\w+)\s+\1" "gogo" | 2504 "(\w+)\s+\1" "gogo" |
2487 "(\w+)\s+\1" "1212" | 2505 "(\w+)\s+\1" "1212" |
2488 "^[a-zA-Z0-9\-\.]+\.(com|org|net|mil|edu|COM|ORG|NET|MIL|EDU)$" G "<0>3SquareB
and.com</0>" | 2506 "^[a-zA-Z0-9\-\.]+\.(com|org|net|mil|edu|COM|ORG|NET|MIL|EDU)$" G "<0>3SquareB
and.com</0>" |
2489 "^[a-zA-Z0-9\-\.]+\.(com|org|net|mil|edu|COM|ORG|NET|MIL|EDU)$" G "<0>asp.net<
/0>" | 2507 "^[a-zA-Z0-9\-\.]+\.(com|org|net|mil|edu|COM|ORG|NET|MIL|EDU)$" G "<0>asp.net<
/0>" |
2490 "^[a-zA-Z0-9\-\.]+\.(com|org|net|mil|edu|COM|ORG|NET|MIL|EDU)$" G "<0>army.mil
</0>" | 2508 "^[a-zA-Z0-9\-\.]+\.(com|org|net|mil|edu|COM|ORG|NET|MIL|EDU)$" G "<0>army.mil
</0>" |
2491 "^[a-zA-Z0-9\-\.]+\.(com|org|net|mil|edu|COM|ORG|NET|MIL|EDU)$" "$SquareBand
.com" | 2509 "^[a-zA-Z0-9\-\.]+\.(com|org|net|mil|edu|COM|ORG|NET|MIL|EDU)$" "$SquareBand
.com" |
2492 "^[a-zA-Z0-9\-\.]+\.(com|org|net|mil|edu|COM|ORG|NET|MIL|EDU)$" "asp/dot.net
" | 2510 "^[a-zA-Z0-9\-\.]+\.(com|org|net|mil|edu|COM|ORG|NET|MIL|EDU)$" "asp/dot.net
" |
2493 "^[a-zA-Z0-9\-\.]+\.(com|org|net|mil|edu|COM|ORG|NET|MIL|EDU)$" "army.milita
ry" | 2511 "^[a-zA-Z0-9\-\.]+\.(com|org|net|mil|edu|COM|ORG|NET|MIL|EDU)$" "army.milita
ry" |
2494 | 2512 |
OLD | NEW |