agent-exec transport 2f80ef82aa46c436ab31ad04be4314d5/5a44c92c20c8
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
package runtime
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"strings"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestMaterialChoiceNoticeAcceptsFourBoundedChineseOptions(t *testing.T) {
|
||||
items := []materialChoiceData{
|
||||
{Label: "会议摘要", Basis: strings.Repeat("依据", 90)},
|
||||
{Label: "验收清单", Basis: strings.Repeat("依据", 90)},
|
||||
{Label: "联调计划", Basis: strings.Repeat("依据", 90)},
|
||||
{Label: "范围对照", Basis: strings.Repeat("依据", 90)},
|
||||
}
|
||||
raw, err := json.Marshal(items)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
notice := "<system-reminder>\n后台子代理「材料整理」已结束。\n状态:completed\n" +
|
||||
MaterialChoiceOptionsPrefix + string(raw) + "\n" + MaterialChoiceReadyMarker + "\n</system-reminder>"
|
||||
choices := materialOptionsFromNotice(notice)
|
||||
if len(choices) != 4 || choices[0].Label != "会议摘要" || choices[3].Label != "范围对照" {
|
||||
t.Fatalf("four valid bounded options were lost: %d", len(choices))
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user