package feed

import (
	"github.com/stretchr/testify/assert"
	"testing"
)

func Test_stringCutAndEclipse(t *testing.T) {
	type args struct {
		str string
	}
	tests := []struct {
		name string
		args args
		want string
	}{
		{
			name: "è¶…é•¿ä¸­æ–‡",
			args: args{
				"ä¸€ä¸ªğŸ‘ŒğŸ�»æ°´ç”µè´¹è¿�é”�çš„æ˜¯çš„æ˜¯çš„æ˜¯çš„æ˜¯çš„",
			},
			want: "ä¸€ä¸ªğŸ‘ŒğŸ�»æ°´ç”µè´¹è¿�é”�çš„æ˜¯çš„...",
		},
	}
	for _, tt := range tests {
		t.Run(tt.name, func(t *testing.T) {
			assert.Equalf(t, tt.want, stringCutAndEclipse(tt.args.str), "stringCutAndEclipse(%v)", tt.args.str)
		})
	}
}
