From 950aabce192d6dd15eee60717a510be2bb4f9c7c Mon Sep 17 00:00:00 2001 From: Michael Strùˆder Date: Wed, 3 May 2017 10:59:26 +0200 Subject: test multiple whitespace --- todolist/parser_test.go | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/todolist/parser_test.go b/todolist/parser_test.go index 9dfa454..05f390a 100644 --- a/todolist/parser_test.go +++ b/todolist/parser_test.go @@ -170,6 +170,16 @@ func TestDueIntelligentlyChoosesCorrectYear(t *testing.T) { assert.Equal("2017-01-10", parser.parseArbitraryDate("jan 10", decemberTime)) } +func TestParseCommandIdSubjectWhitespace(t *testing.T) { + assert := assert.New(t) + parser := Parser{"es 24\t a new subject"} + command, id, subject := parser.Parse() + + assert.Equal("es", command) + assert.Equal(24, id) + assert.Equal("a new subject", subject) +} + func TestParseCommandIdSubject(t *testing.T) { assert := assert.New(t) parser := Parser{"es 24 a new subject"} @@ -188,5 +198,5 @@ func TestParseInvalidCommandIdSubject(t *testing.T) { assert.Equal("", command) assert.Equal(-1, id) - assert.Equal(input, subject) + assert.Equal("", subject) } -- cgit v1.3