aboutsummaryrefslogtreecommitdiffstats
path: root/todolist/parser_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'todolist/parser_test.go')
-rw-r--r--todolist/parser_test.go10
1 files changed, 10 insertions, 0 deletions
diff --git a/todolist/parser_test.go b/todolist/parser_test.go
index 05f390a..4466489 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 TestParseCommandIdSubjectOptionalSubject(t *testing.T) {
+ assert := assert.New(t)
+ parser := Parser{"d 24"}
+ command, id, subject := parser.Parse()
+
+ assert.Equal("d", command)
+ assert.Equal(24, id)
+ assert.Equal("", subject)
+}
+
func TestParseCommandIdSubjectWhitespace(t *testing.T) {
assert := assert.New(t)
parser := Parser{"es 24\t a new subject"}