From 11abbd27472d032f0f272cd45206f5af855aafea Mon Sep 17 00:00:00 2001 From: Phillip Lord Date: Wed, 12 Jun 2019 22:28:38 +0100 Subject: Add robotized test --- robot/org-drill-launch.el | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 robot/org-drill-launch.el (limited to 'robot/org-drill-launch.el') diff --git a/robot/org-drill-launch.el b/robot/org-drill-launch.el new file mode 100644 index 0000000..bab57ec --- /dev/null +++ b/robot/org-drill-launch.el @@ -0,0 +1,31 @@ +;; Shutup +(setq make-backup-files nil) +(setq auto-save-default nil) + +;; Clean up +(delete-file "./robot/failure.txt") + +(set-frame-name "emacs-bot") + +(condition-case e + (progn (load-file "org-learn.el") + (load-file "org-drill.el")) + (error + (with-temp-buffer + (insert (format "%s" (error-message-string e))) + (write-region (point-min) (point-max) "./robot/failure.txt")) + (let ((kill-emacs-hook nil)) + (kill-emacs)))) + +(copy-file "robot/main-test.org" "robot/main-test-copy.org" t) +(find-file "robot/main-test-copy.org") + +(condition-case e + (org-drill) + (error + (with-temp-buffer + (insert (format "%s" (error-message-string e))) + ;; write to ./ now because we have changed directory + (write-region (point-min) (point-max) "./failure.txt")) + (let ((kill-emacs-hook nil)) + (kill-emacs)))) -- cgit v1.2.3