emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/org-drill d37519f54c 147/251: Clean up robot testing


From: ELPA Syncer
Subject: [nongnu] elpa/org-drill d37519f54c 147/251: Clean up robot testing
Date: Mon, 17 Jan 2022 18:59:10 -0500 (EST)

branch: elpa/org-drill
commit d37519f54c903bc51377a261c070cb0e0987fbc5
Author: Phillip Lord <phillip.lord@russet.org.uk>
Commit: Phillip Lord <phillip.lord@russet.org.uk>

    Clean up robot testing
---
 robot/basic-run.el |  4 ++--
 robot/basic-run.sh |  1 -
 robot/robot.el     | 11 ++++++++++-
 robot/robot.sh     |  5 +++--
 4 files changed, 15 insertions(+), 6 deletions(-)

diff --git a/robot/basic-run.el b/robot/basic-run.el
index 8e853e3dc9..2059d7b0eb 100644
--- a/robot/basic-run.el
+++ b/robot/basic-run.el
@@ -2,8 +2,8 @@
 (load-file "org-drill.el")
 
 (defun org-drill-do-drill ()
-  (copy-file "robot/main-test.org" "robot/main-test-copy.org" t)
-  (find-file "robot/main-test-copy.org")
+  (copy "main-test.org" "main-test-copy.org")
+  (find "main-test-copy.org")
 
   (org-drill)
   (set-buffer-modified-p nil)
diff --git a/robot/basic-run.sh b/robot/basic-run.sh
index d92172df10..336063f25c 100755
--- a/robot/basic-run.sh
+++ b/robot/basic-run.sh
@@ -43,4 +43,3 @@ launch_emacs $this_dir/basic-run.el
 
     wait_emacs
 } || cat robot/failure.txt
-    $EMACS -Q -l $1 &
diff --git a/robot/robot.el b/robot/robot.el
index 43f31da63a..a9813d975a 100644
--- a/robot/robot.el
+++ b/robot/robot.el
@@ -9,8 +9,17 @@
 (setq debug-on-error t)
 (setq debug-on-quit t)
 
+(defun robot-file (file)
+  (concat top-dir "robot/" file))
+
 (defun clean (file)
-  (delete-file (concat top-dir "robot/" file)))
+  (delete-file (robot-file file)))
+
+(defun copy (from to)
+  (copy-file (robot-file from) (robot-file to) t))
+
+(defun find (file)
+  (find-file (robot-file file)))
 
 ;; Clean up
 (clean "failure.txt")
diff --git a/robot/robot.sh b/robot/robot.sh
index 022b567428..e0c3e6acc0 100644
--- a/robot/robot.sh
+++ b/robot/robot.sh
@@ -28,8 +28,9 @@ function send_answer {
 }
 
 function launch_emacs {
-    echo Launching $EMACS -Q -l $1 &
-    $EMACS -Q -l $1 &
+    echo Launching $EMACS -Q -l $* &
+
+    $EMACS -Q -l $* &
     emacs_process_pid=$!
 }
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]