summaryrefslogtreecommitdiff
path: root/gnosis-dev.el
diff options
context:
space:
mode:
authorThanos Apollo <[email protected]>2024-01-11 20:41:10 +0200
committerThanos Apollo <[email protected]>2024-01-11 20:41:10 +0200
commit24b2802a19a2a4cc843f98c9ed4800724d94e49f (patch)
treec2e10b581685ac404e87de8fb5dd685b5ef9cfb7 /gnosis-dev.el
parent02d0fef94b3eb520f38ab6486c355711d6fb8836 (diff)
Redo gnosis-dev-test
Diffstat (limited to 'gnosis-dev.el')
-rw-r--r--gnosis-dev.el30
1 files changed, 13 insertions, 17 deletions
diff --git a/gnosis-dev.el b/gnosis-dev.el
index dadbe04..bf78f5f 100644
--- a/gnosis-dev.el
+++ b/gnosis-dev.el
@@ -75,27 +75,23 @@ If ask nil, leave development env"
(let ((ask (y-or-n-p "Start development env?"))
(testing-dir (concat gnosis-dir "/testing")))
(if ask
- (progn (unless (file-exists-p testing-dir)
- (make-directory testing-dir))
- (setf gnosis-db (emacsql-sqlite (concat testing-dir "/testing.db")))
- (setf gnosis-testing t)
- (gnosis-db-init)
- (gnosis-dev-add-fields)
- (message "Adding testing values...")
- (message "Development env is ready for testing."))
+ (progn
+ (unless (file-exists-p testing-dir)
+ (make-directory testing-dir))
+ (setf gnosis-db (emacsql-sqlite (concat testing-dir "/testing.db")))
+ (setf gnosis-testing t)
+ (dolist (table '(notes decks review review-log extras))
+ (condition-case nil
+ (gnosis--drop-table table)
+ (error (message "No %s table to drop." table))))
+ (gnosis-db-init)
+ (gnosis-dev-add-fields)
+ (message "Adding testing values...")
+ (message "Development env is ready for testing."))
(setf gnosis-db (emacsql-sqlite (concat (file-name-as-directory gnosis-dir) "gnosis.db")))
(setf gnosis-testing nil)
(message "Exited development env."))))
-(defun gnosis-dev-retest ()
- "Redo database."
- (interactive)
- (dolist (table '(notes decks review review-log extras))
- (condition-case nil
- (gnosis--drop-table table)
- (error (message "No %s table to drop." table))))
- (gnosis-db-init)
- (gnosis-dev-test))
(provide 'gnosis-dev)
;;; gnosis-dev.el ends here