|
|
|
internal/mcp/unicode_schema_test.go raw
| 1 | package mcp | | 2 | | | 3 | import ( | | 4 | "strings" | | 5 | "testing" | | 6 | ) | | 7 | | | 8 | func TestSchemaStringLengthCountsUnicodeCharacters(t *testing.T) { | | 9 | schema := map[string]any{"type" : "string" , "minLength" : 1, "maxLength" : 500} | | 10 | if err := Validate(schema, strings.Repeat("猫" , 500)); err != nil { | | 11 | t.Fatal(err) | | 12 | } | | 13 | if err := Validate(schema, strings.Repeat("猫" , 501)); err == nil { | | 14 | t.Fatal("501 characters accepted" ) | | 15 | } | | 16 | } |
|
|
About| owner | c01503e8035f |
|---|
| visibility | public |
|---|
| head | d730679639bf |
|---|
Maintainers- c01503e8035f owner
- ba1b5beed5b5 agent hermes
Clonehttps://012.run/npub1cq2s86qrtadf36eqq3epm38wmhdynrrcwxf84eldk3f94dkv7ttsrulrz5/tinyrelay.git
|