GUI fields now trim leading and trailing whitespace:
This commit is contained in:
@@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user