From f3af5834c20942783a6cea5194b292e040fa4609 Mon Sep 17 00:00:00 2001 From: Miek Gieben Date: Sat, 11 Jan 2014 08:12:13 +0000 Subject: [PATCH] Also add empty txt record in another test --- parse_test.go | 1 + zscan_rr.go | 1 + 2 files changed, 2 insertions(+) diff --git a/parse_test.go b/parse_test.go index bfdd942a..ab043898 100644 --- a/parse_test.go +++ b/parse_test.go @@ -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\"", diff --git a/zscan_rr.go b/zscan_rr.go index 1abf0b49..ca2625b2 100644 --- a/zscan_rr.go +++ b/zscan_rr.go @@ -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}, ""