File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed
tests/LinkDotNet.StringBuilder.UnitTests Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -205,4 +205,18 @@ public void GivenStringBuilder_WhenAddingSingleCharacter_ThenShouldBeAdded()
205205
206206 builder . ToString ( ) . Should ( ) . Be ( "c" ) ;
207207 }
208+
209+ [ Fact ]
210+ public void GivenStringBuilder_WhenAddingIncreasinglyLargerStrings_ThenShouldBeAdded ( )
211+ {
212+ using var builder = new ValueStringBuilder ( ) ;
213+ builder . Append ( new string ( 'a' , 256 ) ) ;
214+ builder . Append ( new string ( 'b' , 512 ) ) ;
215+ builder . Append ( new string ( 'c' , 1024 ) ) ;
216+ builder . Append ( new string ( 'd' , 2048 ) ) ;
217+ builder . Append ( new string ( 'e' , 4096 ) ) ;
218+ builder . Append ( new string ( 'f' , 8192 ) ) ;
219+
220+ builder . ToString ( ) . Should ( ) . MatchRegex ( "[a]{256}[b]{512}[c]{1024}[d]{2048}[e]{4096}[f]{8192}" ) ;
221+ }
208222}
You can’t perform that action at this time.
0 commit comments