@@ -1436,31 +1436,33 @@ extension RegexTests {
1436
1436
1437
1437
// MARK: Parse with delimiters
1438
1438
1439
- parseWithDelimitersTest ( " ' /a b/' " , concat ( " a " , " " , " b " ) )
1440
- parseWithDelimitersTest ( " ' |a b|' " , concat ( " a " , " b " ) )
1439
+ parseWithDelimitersTest ( " # /a b/# " , concat ( " a " , " " , " b " ) )
1440
+ parseWithDelimitersTest ( " # |a b|# " , concat ( " a " , " b " ) )
1441
1441
1442
- parseWithDelimitersTest ( " ' |[a b]|' " , charClass ( " a " , " b " ) )
1442
+ parseWithDelimitersTest ( " # |[a b]|# " , charClass ( " a " , " b " ) )
1443
1443
parseWithDelimitersTest (
1444
- " ' |(?-x)[a b]|' " , changeMatchingOptions (
1444
+ " # |(?-x)[a b]|# " , changeMatchingOptions (
1445
1445
matchingOptions ( removing: . extended) , isIsolated: true ,
1446
1446
charClass ( " a " , " " , " b " ) )
1447
1447
)
1448
- parseWithDelimitersTest ( " ' |[[a ] b]|' " , charClass ( charClass ( " a " ) , " b " ) )
1448
+ parseWithDelimitersTest ( " # |[[a ] b]|# " , charClass ( charClass ( " a " ) , " b " ) )
1449
1449
1450
1450
// Non-semantic whitespace between quantifier characters for consistency
1451
1451
// with PCRE.
1452
- parseWithDelimitersTest ( " ' |a * ?|' " , zeroOrMore ( . reluctant, of: " a " ) )
1452
+ parseWithDelimitersTest ( " # |a * ?|# " , zeroOrMore ( . reluctant, of: " a " ) )
1453
1453
1454
1454
// End-of-line comments aren't enabled by default in experimental syntax.
1455
- parseWithDelimitersTest ( " ' |#abc|' " , concat ( " # " , " a " , " b " , " c " ) )
1456
- parseWithDelimitersTest ( " ' |(?x)#abc|' " , changeMatchingOptions (
1455
+ parseWithDelimitersTest ( " # |#abc|# " , concat ( " # " , " a " , " b " , " c " ) )
1456
+ parseWithDelimitersTest ( " # |(?x)#abc|# " , changeMatchingOptions (
1457
1457
matchingOptions ( adding: . extended) , isIsolated: true ,
1458
1458
empty ( ) )
1459
1459
)
1460
1460
1461
- parseWithDelimitersTest ( " '|||' " , alt ( empty ( ) , empty ( ) ) )
1462
- parseWithDelimitersTest ( " '||||' " , alt ( empty ( ) , empty ( ) , empty ( ) ) )
1463
- parseWithDelimitersTest ( " '|a||' " , alt ( " a " , empty ( ) ) )
1461
+ parseWithDelimitersTest ( " #|||# " , alt ( empty ( ) , empty ( ) ) )
1462
+ parseWithDelimitersTest ( " #||||# " , alt ( empty ( ) , empty ( ) , empty ( ) ) )
1463
+ parseWithDelimitersTest ( " #|a||# " , alt ( " a " , empty ( ) ) )
1464
+
1465
+ parseWithDelimitersTest ( " re'x*' " , zeroOrMore ( of: " x " ) )
1464
1466
1465
1467
// MARK: Parse not-equal
1466
1468
@@ -1878,6 +1880,6 @@ extension RegexTests {
1878
1880
1879
1881
func testlibswiftDiagnostics( ) {
1880
1882
libswiftDiagnosticMessageTest (
1881
- " ' /[x*/' " , " cannot parse regular expression: expected ']' " )
1883
+ " # /[x*/# " , " cannot parse regular expression: expected ']' " )
1882
1884
}
1883
1885
}
0 commit comments