Add unit test to test parsing of the id on newly created tasks

This commit is contained in:
Patrick Winter 2019-11-04 15:36:46 +01:00
parent a19eebacd0
commit 02af750b16

View file

@ -18,5 +18,11 @@
(should (string= (aref (alist-get 'tags task) 0) "emacs")) (should (string= (aref (alist-get 'tags task) 0) "emacs"))
(should (string= (alist-get 'description task) "Write test suite for taskwarrior.el (using ERT)")))) (should (string= (alist-get 'description task) "Write test suite for taskwarrior.el (using ERT)"))))
(ert-deftest taskwarrior-parse-task-id ()
(should (string= (taskwarrior--parse-created-task-id "Created task 9.") "9"))
(should (string= (taskwarrior--parse-created-task-id "Created task 1000.") "1000"))
(should (string= (taskwarrior--parse-created-task-id "Some invalid input") nil)))
(provide 'taskwarrior-test) (provide 'taskwarrior-test)
;;; taskwarrior-test.el ends here ;;; taskwarrior-test.el ends here