Files
core/internal/api/ui_pathseg_test.go
2026-03-16 16:03:54 +03:00

20 lines
356 B
Go

package api
import "testing"
func TestUIPathSegRoundTrip(t *testing.T) {
cases := []string{
"",
"Vendor Name",
"Model_With_Underscore",
"Name With Both_Value",
}
for _, tc := range cases {
encoded := uiPathSeg(tc)
decoded := uiUnpathSeg(encoded)
if decoded != tc {
t.Fatalf("round trip %q => %q => %q", tc, encoded, decoded)
}
}
}