@@ -1575,27 +1575,29 @@ extension RegexTests {
15751575 ( input: " hezllo " , match: nil ) ,
15761576 ( input: " helloz " , match: nil ) )
15771577
1578+ // MARK: Lookbehinds
15781579 firstMatchTest (
1579- #"(?<=USD)\d+"# , input: " Price: USD100 " , match: " 100 " , xfail : true )
1580+ #"(?<=USD)\d+"# , input: " Price: USD100 " , match: " 100 " )
15801581 firstMatchTest (
1581- #"(*plb:USD)\d+"# , input: " Price: USD100 " , match: " 100 " , xfail : true )
1582+ #"(*plb:USD)\d+"# , input: " Price: USD100 " , match: " 100 " )
15821583 firstMatchTest (
15831584 #"(*positive_lookbehind:USD)\d+"# ,
1584- input: " Price: USD100 " , match: " 100 " , xfail: true )
1585- // engines generally enforce that lookbehinds are fixed width
1585+ input: " Price: USD100 " , match: " 100 " )
1586+
1587+ // TODO: Why is a match not found when unoptimized?
15861588 firstMatchTest (
1587- #"\d{3}(?<=USD\d{3})"# , input: " Price: USD100 " , match: " 100 " , xfail : true )
1589+ #"\d{3}(?<=USD\d{3})"# , input: " Price: USD100 " , match: " 100 " )
15881590
15891591 firstMatchTest (
1590- #"(?<!USD)\d+"# , input: " Price: JYP100 " , match: " 100 " , xfail : true )
1592+ #"(?<!USD)\d+"# , input: " Price: JYP100 " , match: " 100 " )
15911593 firstMatchTest (
1592- #"(*nlb:USD)\d+"# , input: " Price: JYP100 " , match: " 100 " , xfail : true )
1594+ #"(*nlb:USD)\d+"# , input: " Price: JYP100 " , match: " 100 " )
15931595 firstMatchTest (
15941596 #"(*negative_lookbehind:USD)\d+"# ,
1595- input: " Price: JYP100 " , match: " 100 " , xfail : true )
1596- // engines generally enforce that lookbehinds are fixed width
1597+ input: " Price: JYP100 " , match: " 100 " )
1598+
15971599 firstMatchTest (
1598- #"\d{3}(?<!USD\d{3})"# , input: " Price: JYP100 " , match: " 100 " , xfail : true )
1600+ #"\d{3}(?<!USD\d{3})"# , input: " Price: JYP100 " , match: " 100 " )
15991601 }
16001602
16011603 func testMatchAnchors( ) throws {
0 commit comments