@@ -257,25 +257,22 @@ func Test_diffCharsToLines(t *testing.T) {
257
257
Diff {DiffInsert , "beta\n alpha\n beta\n " }}, actual )
258
258
259
259
// More than 256 to reveal any 8-bit limitations.
260
- n := 257
261
- tmpVector = []string {}
262
- lineList := []rune {}
260
+ n := 300
261
+ lineList := []string {}
263
262
charList := []rune {}
264
263
265
264
for x := 1 ; x <= n ; x ++ {
266
- tmpVector = append (tmpVector , string (x )+ "\n " )
267
- lineList = append (lineList , rune (x ), '\n' )
265
+ lineList = append (lineList , strconv .Itoa (x ) + "\n " )
268
266
charList = append (charList , rune (x ))
269
267
}
270
268
271
- assert .Equal (t , n , len (tmpVector ))
272
269
assert .Equal (t , n , len (charList ))
273
270
274
- tmpVector = append ([]string {"" }, tmpVector ... )
271
+ lineList = append ([]string {"" }, lineList ... )
275
272
diffs = []Diff {Diff {DiffDelete , string (charList )}}
276
- actual = dmp .DiffCharsToLines (diffs , tmpVector )
273
+ actual = dmp .DiffCharsToLines (diffs , lineList )
277
274
assertDiffEqual (t , []Diff {
278
- Diff {DiffDelete , string (lineList )}}, actual )
275
+ Diff {DiffDelete , strings . Join (lineList , "" )}}, actual )
279
276
}
280
277
281
278
func Test_diffCleanupMerge (t * testing.T ) {
0 commit comments