@@ -804,6 +804,20 @@ extension RegexTests {
804804 #"a(?#. comment)b"# ,
805805 concat ( " a " , " b " ) )
806806
807+ // MARK: Interpolation
808+
809+ // These are literal as there's no closing '}>'
810+ parseTest ( " <{ " , concat ( " < " , " { " ) )
811+ parseTest ( " <{a " , concat ( " < " , " { " , " a " ) )
812+ parseTest ( " <{a} " , concat ( " < " , " { " , " a " , " } " ) )
813+ parseTest ( " <{<{} " , concat ( " < " , " { " , " < " , " { " , " } " ) )
814+
815+ // Literal as escaped
816+ parseTest ( #"\<{}>"# , concat ( " < " , " { " , " } " , " > " ) )
817+
818+ // A quantification
819+ parseTest ( #"<{2}"# , exactly ( 2 , of: " < " ) )
820+
807821 // MARK: Quantification
808822
809823 parseTest ( " a* " , zeroOrMore ( of: " a " ) )
@@ -2574,6 +2588,15 @@ extension RegexTests {
25742588 diagnosticTest ( " | \u{360} " , . confusableCharacter( " | \u{360} " ) )
25752589 diagnosticTest ( " \u{361} " , . confusableCharacter( " \u{361} " ) )
25762590
2591+ // MARK: Interpolation (currently unsupported)
2592+
2593+ diagnosticTest ( " <{}> " , . unsupported( " interpolation " ) )
2594+ diagnosticTest ( " <{...}> " , . unsupported( " interpolation " ) )
2595+ diagnosticTest ( " <{)}> " , . unsupported( " interpolation " ) )
2596+ diagnosticTest ( " <{}}> " , . unsupported( " interpolation " ) )
2597+ diagnosticTest ( " <{<{}> " , . unsupported( " interpolation " ) )
2598+ diagnosticTest ( " (<{)}> " , . unsupported( " interpolation " ) )
2599+
25772600 // MARK: Character properties
25782601
25792602 diagnosticTest ( #"\p{Lx}"# , . unknownProperty( key: nil , value: " Lx " ) )
0 commit comments