@@ -102,6 +102,10 @@ type BraceMatchingServiceTests() =
102102 member this.BraceInInterpolatedStringSimple () =
103103 this.VerifyBraceMatch( " let x = $\" abc{1}def\" " , " {1" , " }def" )
104104
105+ [<Fact>]
106+ member this.BraceInInterpolatedStringWith2Dollars () =
107+ this.VerifyBraceMatch( " let x = $$\"\"\" abc{{1}}}def\"\"\" " , " {{" , " }}" )
108+
105109 [<Fact>]
106110 member this.BraceInInterpolatedStringWith3Dollars () =
107111 this.VerifyBraceMatch( " let x = $$$\"\"\" abc{{{1}}}def\"\"\" " , " {{{" , " }}}" )
@@ -111,10 +115,23 @@ type BraceMatchingServiceTests() =
111115 [<InlineData( " }}match" ) >]
112116 [<InlineData( " f{" ) >]
113117 [<InlineData( " 6}" ) >]
114- member this.BraceNoMatchInNestedInterpolatedStrings ( marker ) =
118+ member this.BraceNoMatchInNestedInterpolatedStrings3Dollars ( marker ) =
115119 let source =
116120 " let x = $$$\"\"\" {{not a }}match
117121e{{{4$\" f{56}g\" }}}h
122+ \"\"\" "
123+
124+ this.VerifyNoBraceMatch( source, marker)
125+
126+ [<Theory>]
127+ [<InlineData( " {not" ) >]
128+ [<InlineData( " }match" ) >]
129+ [<InlineData( " f{" ) >]
130+ [<InlineData( " 6}" ) >]
131+ member this.BraceNoMatchInNestedInterpolatedStrings2Dollars ( marker ) =
132+ let source =
133+ " let x = $$\"\"\" {not a }match
134+ e{{{4$\" f{56}g\" }}}h
118135\"\"\" "
119136
120137 this.VerifyNoBraceMatch( source, marker)
@@ -123,10 +140,22 @@ e{{{4$\"f{56}g\"}}}h
123140 [<InlineData( " {{{23" , " }}}d" ) >]
124141 [<InlineData( " {{{4$" , " }}}h" ) >]
125142 [<InlineData( " {56" , " }g" ) >]
126- member this.BraceMatchInNestedInterpolatedStrings ( startMark , endMark ) =
143+ member this.BraceMatchInNestedInterpolatedStrings3Dollars ( startMark , endMark ) =
127144 let source =
128145 " let x = $$$\"\"\" a{{{01}}}b --- c{{{23}}}d
129146e{{{4$\" f{56}g\" }}}h
147+ \"\"\" "
148+
149+ this.VerifyBraceMatch( source, startMark, endMark)
150+
151+ [<Theory>]
152+ [<InlineData( " {{23" , " }}}d" ) >]
153+ [<InlineData( " {{4$" , " }}}h" ) >]
154+ [<InlineData( " {56" , " }g" ) >]
155+ member this.BraceMatchInNestedInterpolatedStrings2Dollars ( startMark , endMark ) =
156+ let source =
157+ " let x = $$\"\"\" a{{{01}}}b --- c{{{23}}}d
158+ e{{{4$\" f{56}g\" }}}h
130159\"\"\" "
131160
132161 this.VerifyBraceMatch( source, startMark, endMark)
0 commit comments