From bcf8b7532b8ea26adf8967d9b9baadcd2139db2d Mon Sep 17 00:00:00 2001 From: Eric Promislow Date: Fri, 28 Apr 2017 13:33:35 -0700 Subject: [PATCH] [477] - Bring up coverage. --- conf/lex_test.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/conf/lex_test.go b/conf/lex_test.go index 99313b89..5742413d 100644 --- a/conf/lex_test.go +++ b/conf/lex_test.go @@ -658,6 +658,16 @@ func TestCompoundStringESE(t *testing.T) { expect(t, lx, expectedItems) } +func TestBadStringEscape(t *testing.T) { + expectedItems := []item{ + {itemKey, "foo", 1}, + {itemError, "Invalid escape character 'y'. Only the following escape characters are allowed: \\xXX, \\t, \\n, \\r, \\\", \\\\.", 1}, + {itemEOF, "", 2}, + } + lx := lex(`foo = \y`) + expect(t, lx, expectedItems) +} + func TestNonBool(t *testing.T) { expectedItems := []item{ {itemKey, "foo", 1},