diff options
| author | Rodrigo Dumont <rlsdumont@gmail.com> | 2017-03-25 18:27:26 -0300 |
|---|---|---|
| committer | Rodrigo Dumont <rlsdumont@gmail.com> | 2017-03-25 18:27:26 -0300 |
| commit | 91c11630ef1e0a5394754def253876507ac8b94d (patch) | |
| tree | bb6b474664c0ad8726c42af9953c96126923423b /todolist/parser_test.go | |
| parent | bd1c22d1af9cde98a7e1340df4d6d4e187b6b889 (diff) | |
Adds support to projects with hyphen
Diffstat (limited to 'todolist/parser_test.go')
| -rw-r--r-- | todolist/parser_test.go | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/todolist/parser_test.go b/todolist/parser_test.go index cbb94e8..8cd6b53 100644 --- a/todolist/parser_test.go +++ b/todolist/parser_test.go @@ -42,8 +42,8 @@ func TestParseExpandProjects(t *testing.T) { func TestParseProjects(t *testing.T) { parser := &Parser{} - todo := parser.ParseNewTodo("do this thing +proj1 +proj2 +專案3 due tomorrow") - if len(todo.Projects) != 3 { + todo := parser.ParseNewTodo("do this thing +proj1 +proj2 +專案3 +proj-name due tomorrow") + if len(todo.Projects) != 4 { t.Error("Expected Projects length to be 3") } if todo.Projects[0] != "proj1" { @@ -55,6 +55,9 @@ func TestParseProjects(t *testing.T) { if todo.Projects[2] != "專案3" { t.Error("todo.Projects[2] should equal '專案3' but got", todo.Projects[2]) } + if todo.Projects[3] != "proj-name" { + t.Error("todo.Projects[3] should equal 'proj-name' but got", todo.Projects[3]) + } } func TestParseContexts(t *testing.T) { |
