@@ -193,13 +193,13 @@ func TestGenerateTextPreview(t *testing.T) {
193193 expected : "hello world" ,
194194 },
195195 {
196- name : "exact 500 runes" ,
197- input : string (make ([]rune , 500 )),
198- expected : string (make ([]rune , 500 )),
196+ name : "exact 100 runes" ,
197+ input : string (make ([]rune , 100 )),
198+ expected : string (make ([]rune , 100 )),
199199 },
200200 {
201201 name : "long ascii content should be trimmed" ,
202- input : string (make ([]byte , 600 )),
202+ input : string (make ([]byte , 200 )),
203203 },
204204 {
205205 name : "utf8 content shorter than limit should not be trimmed" ,
@@ -216,8 +216,8 @@ func TestGenerateTextPreview(t *testing.T) {
216216
217217 switch tt .name {
218218 case "long ascii content should be trimmed" :
219- assert .Len (t , []rune (got ), 503 ) // 500 chars + "..."
220- assert .Equal (t , "..." , string ([]rune (got )[500 :]))
219+ assert .Len (t , []rune (got ), 103 ) // 100 chars + "..."
220+ assert .Equal (t , "..." , string ([]rune (got )[100 :]))
221221 default :
222222 assert .Equal (t , tt .expected , got )
223223 }
0 commit comments