Add internal engine relocation candidate

This commit is contained in:
2026-09-12 15:58:06 +00:00
parent f81def9365
commit 9b4f9ac50e
70 changed files with 14602 additions and 0 deletions

View File

@@ -0,0 +1,27 @@
package engine
import "testing"
func FuzzParsePath(f *testing.F) {
for _, seed := range []string{"", "/", "/service/port", "/a~1b/~0key", "/0", "relative", "/bad~2escape"} {
f.Add(seed)
}
f.Fuzz(func(t *testing.T, input string) {
if len(input) > 4096 {
return
}
path, err := ParsePath(input)
if err != nil {
return
}
canonical := path.String()
reparsed, err := ParsePath(canonical)
if err != nil {
t.Fatalf("canonical path %q did not parse: %v", canonical, err)
}
if reparsed.String() != canonical {
t.Fatalf("path round trip = %q, want %q", reparsed.String(), canonical)
}
})
}