Also add empty txt record in another test

This commit is contained in:
Miek Gieben 2014-01-11 08:12:13 +00:00
parent e64ea20885
commit f3af5834c2
2 changed files with 2 additions and 0 deletions

View File

@ -179,6 +179,7 @@ func TestQuotes(t *testing.T) {
`t.example.com. IN TXT "a bc"`: "t.example.com.\t3600\tIN\tTXT\t\"a bc\"",
`t.example.com. IN TXT "a
bc"`: "t.example.com.\t3600\tIN\tTXT\t\"a\\n bc\"",
`t.example.com. IN TXT ""`: "t.example.com.\t3600\tIN\tTXT\t\"\"",
`t.example.com. IN TXT "a"`: "t.example.com.\t3600\tIN\tTXT\t\"a\"",
`t.example.com. IN TXT "aa"`: "t.example.com.\t3600\tIN\tTXT\t\"aa\"",
`t.example.com. IN TXT "aaa" ;`: "t.example.com.\t3600\tIN\tTXT\t\"aaa\"",

View File

@ -239,6 +239,7 @@ func endingToTxtSlice(c chan lex, errstr, f string) ([]string, *ParseError, stri
s = append(s, "")
}
quote = !quote
// TODO(miek): remove, next line
empty = quote
default:
return nil, &ParseError{f, errstr, l}, ""