2019-10-22 18:52:52 +02:00
|
|
|
;;; taskwarrior-test.el --- taskwarrior unit tests
|
|
|
|
|
|
|
|
;;; Commentary:
|
|
|
|
|
2019-10-23 11:38:57 +02:00
|
|
|
;; Run through make target `m̀ake test`
|
2019-10-22 18:52:52 +02:00
|
|
|
|
|
|
|
;;; Code:
|
|
|
|
|
|
|
|
(require 'ert)
|
|
|
|
|
|
|
|
(ert-deftest taskwarrior-add-task-test ()
|
|
|
|
"Ensure that special characters such as quotes and parens are properly escaped when adding new tasks"
|
|
|
|
(let* ((task-id (taskwarrior--add "project:ert +emacs \"Write test suite for taskwarrior.el (using ERT)\""))
|
|
|
|
(task (taskwarrior-export-task task-id)))
|
|
|
|
(should (string= (alist-get 'project task) "ert"))
|
|
|
|
(should (string= (aref (alist-get 'tags task) 0) "emacs"))
|
2019-10-23 11:38:57 +02:00
|
|
|
(should (string= (alist-get 'description task) "Write test suite for taskwarrior.el (using ERT)"))))
|