diff options
Diffstat (limited to 'plugin/normalize_test.go')
-rw-r--r-- | plugin/normalize_test.go | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/plugin/normalize_test.go b/plugin/normalize_test.go index 315aaf5d9..2a82271ba 100644 --- a/plugin/normalize_test.go +++ b/plugin/normalize_test.go @@ -83,6 +83,17 @@ func TestHostNormalize(t *testing.T) { } } +func TestHostMustNormalizeFail(t *testing.T) { + hosts := []string{"..:53", "::", ""} + for i := 0; i < len(hosts); i++ { + ts := hosts[i] + h, err := Host(ts).MustNormalize() + if err == nil { + t.Errorf("Expected error, got %v", h) + } + } +} + func TestSplitHostPortReverse(t *testing.T) { tests := map[string]int{ "example.org.": 0, |