branch: elpa/gnosis commit 7a6ca790189476e97c08e18e5660e88d3d06b466 Author: Thanos Apollo <pub...@thanosapollo.org> Commit: Thanos Apollo <pub...@thanosapollo.org>
tests: Update test-db module + prompt to add test deck. --- tests/gnosis-test-db.el | 7 ++++++- tests/test.org | 1 + 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/tests/gnosis-test-db.el b/tests/gnosis-test-db.el index f233c6b4d4..1a8161e65c 100644 --- a/tests/gnosis-test-db.el +++ b/tests/gnosis-test-db.el @@ -33,6 +33,10 @@ (defvar gnosis-test-image "anatomy/typic-vertebra-superior-01.png" "Random image for testing") +(defvar gnosis-test-deck-file + (expand-file-name "test.org" + (file-name-directory (or load-file-name buffer-file-name)))) + (defun gnosis-test-random-items (list x) "Select X random items from LIST." (let ((shuffled-list (copy-sequence list)) @@ -64,7 +68,8 @@ If ask nil, leave testing env" (error (message "No %s table to drop." table)))) (setf gnosis-testing t) (gnosis-db-init) - (message "Development env is ready for testing.")) + (message "Development env is ready for testing.") + (and (y-or-n-p "Add testing deck? ") (gnosis-import-deck gnosis-test-deck-file))) (setf gnosis-db (emacsql-sqlite-open (expand-file-name "gnosis.db" gnosis-dir))) (setf gnosis-testing nil) (message "Exited development env.")))) diff --git a/tests/test.org b/tests/test.org index aaa40ff297..dea294d01a 100644 --- a/tests/test.org +++ b/tests/test.org @@ -1,4 +1,5 @@ #+DECK: test +#+DESCRIPTION: Testing deck for gnosis. * Thema :latin:phrases: :PROPERTIES: