@@ -1436,31 +1436,33 @@ extension RegexTests {
14361436
14371437 // MARK: Parse with delimiters
14381438
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 " ) )
14411441
1442- parseWithDelimitersTest ( " ' |[a b]|' " , charClass ( " a " , " b " ) )
1442+ parseWithDelimitersTest ( " # |[a b]|# " , charClass ( " a " , " b " ) )
14431443 parseWithDelimitersTest (
1444- " ' |(?-x)[a b]|' " , changeMatchingOptions (
1444+ " # |(?-x)[a b]|# " , changeMatchingOptions (
14451445 matchingOptions ( removing: . extended) , isIsolated: true ,
14461446 charClass ( " a " , " " , " b " ) )
14471447 )
1448- parseWithDelimitersTest ( " ' |[[a ] b]|' " , charClass ( charClass ( " a " ) , " b " ) )
1448+ parseWithDelimitersTest ( " # |[[a ] b]|# " , charClass ( charClass ( " a " ) , " b " ) )
14491449
14501450 // Non-semantic whitespace between quantifier characters for consistency
14511451 // with PCRE.
1452- parseWithDelimitersTest ( " ' |a * ?|' " , zeroOrMore ( . reluctant, of: " a " ) )
1452+ parseWithDelimitersTest ( " # |a * ?|# " , zeroOrMore ( . reluctant, of: " a " ) )
14531453
14541454 // 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 (
14571457 matchingOptions ( adding: . extended) , isIsolated: true ,
14581458 empty ( ) )
14591459 )
14601460
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 " ) )
14641466
14651467 // MARK: Parse not-equal
14661468
@@ -1878,6 +1880,6 @@ extension RegexTests {
18781880
18791881 func testlibswiftDiagnostics( ) {
18801882 libswiftDiagnosticMessageTest (
1881- " ' /[x*/' " , " cannot parse regular expression: expected ']' " )
1883+ " # /[x*/# " , " cannot parse regular expression: expected ']' " )
18821884 }
18831885}
0 commit comments