diff options
| author | Michael Strùˆder <mikezter@gmail.com> | 2017-05-03 10:59:26 +0200 |
|---|---|---|
| committer | Grant Ammons <gammons@gmail.com> | 2017-05-09 20:20:24 -0400 |
| commit | 950aabce192d6dd15eee60717a510be2bb4f9c7c (patch) | |
| tree | fd8b43cba1f77bcbd1f3a525fcd9cf2077626b5b | |
| parent | bb2c579f02e9d273058a6d4d55593622923aaf9f (diff) | |
test multiple whitespace
| -rw-r--r-- | todolist/parser_test.go | 12 |
1 files changed, 11 insertions, 1 deletions
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) } |
