GUI fields now trim leading and trailing whitespace:

This commit is contained in:
Dmitry Sergeev
2026-09-02 00:23:03 +03:00
parent e7b032ce77
commit da5ff8ea4a
9 changed files with 200 additions and 15 deletions
+13
View File
@@ -183,3 +183,16 @@ func TestResolveRetryPolicy(t *testing.T) {
})
}
}
func TestNormalizeFeedInput(t *testing.T) {
domain, uuid := normalizeFeedInput(
" \t/dev/shm/mxl\n",
"\r 5fbec3b1-1b0f-417d-9059-8b94a47197ef \t",
)
if domain != "/dev/shm/mxl" {
t.Fatalf("domain = %q", domain)
}
if uuid != "5fbec3b1-1b0f-417d-9059-8b94a47197ef" {
t.Fatalf("UUID = %q", uuid)
}
}