Tasks: fix listing of tasks

This commit is contained in:
Michiel Borkent 2021-04-26 10:59:05 +02:00
parent 386cbd4ad6
commit d7075ffad0
2 changed files with 9 additions and 2 deletions

View file

@ -289,7 +289,7 @@
(:children forms))
loc (zip/edn the-map)
loc (zip/down loc)
loc (zip/find-next-value loc :tasks)
loc (zip/find-value loc :tasks)
loc (zip/right loc)
loc (zip/down loc)]
(filter symbol?

View file

@ -152,7 +152,14 @@
:task t2/foo}}}"
(let [res (test-utils/bb nil "tasks")]
(is (= "The following tasks are available:\n\ntask1 task1 doc\ntask2 task2 doc\nfoo Foo docstring\nbar Foo docstring\nbaz \nquux Foo docstring\n"
res)))))
res))))
(testing ":tasks is the first node"
(test-utils/with-config "{:tasks {task1
{:doc \"task1 doc\"
:task (+ 1 2 3)}}}"
(let [res (test-utils/bb nil "tasks")]
(is (= "The following tasks are available:\n\ntask1 task1 doc\n"
res))))))
(deftest task-priority-test
(when-not test-utils/native?