resolv.conf nameserver line has only one entry

This commit is contained in:
Andrew Pilloud
2017-04-27 09:17:54 -07:00
parent 120fd322bd
commit 166a0e440d
2 changed files with 3 additions and 2 deletions

View File

@@ -91,6 +91,7 @@ func TestParseResolvConf(t *testing.T) {
{"nameserver\t1.2.3.4", []string{"1.2.3.4"}, []string{}},
{"nameserver \t 1.2.3.4", []string{"1.2.3.4"}, []string{}},
{"nameserver 1.2.3.4\nnameserver 5.6.7.8", []string{"1.2.3.4", "5.6.7.8"}, []string{}},
{"nameserver 1.2.3.4 #comment", []string{"1.2.3.4"}, []string{}},
{"search foo", []string{}, []string{"foo"}},
{"search foo bar", []string{}, []string{"foo", "bar"}},
{"search foo bar bat\n", []string{}, []string{"foo", "bar", "bat"}},