Very small cleanups
This commit is contained in:
parent
80d2db2e86
commit
dfa09b604c
|
@ -8,16 +8,13 @@ import (
|
|||
)
|
||||
|
||||
const normal string = `
|
||||
# This file is automatically generated.
|
||||
#
|
||||
# Comment
|
||||
domain somedomain.com
|
||||
nameserver 10.28.10.2
|
||||
nameserver 11.28.10.1
|
||||
`
|
||||
|
||||
const missingNewline string = `
|
||||
# This file is automatically generated.
|
||||
#
|
||||
domain somedomain.com
|
||||
nameserver 10.28.10.2
|
||||
nameserver 11.28.10.1` // <- NOTE: NO newline.
|
||||
|
@ -49,13 +46,10 @@ func testConfig(t *testing.T, data string) {
|
|||
}
|
||||
}
|
||||
|
||||
// Test we can read a normally formed resolv.conf.
|
||||
func TestNameserver(t *testing.T) {
|
||||
testConfig(t, normal)
|
||||
}
|
||||
|
||||
// Don't drop the last line if there is no newline before EOF.
|
||||
func TestMissingFinalNewLine(t *testing.T) {
|
||||
testConfig(t, missingNewline)
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue