aboutsummaryrefslogtreecommitdiff
path: root/robot/basic-run.sh
diff options
context:
space:
mode:
authorPhillip Lord <phillip.lord@russet.org.uk>2019-06-15 22:10:03 +0100
committerPhillip Lord <phillip.lord@russet.org.uk>2019-06-15 22:10:03 +0100
commitbe851b9eb42faa3c096737daaab0afcbc8c5087e (patch)
tree688f1f53b5908ee5523953b3bc2ef5748f4b3524 /robot/basic-run.sh
parent46d71b5218eadb2be2ec5ca32e5fe40f0640bbb9 (diff)
downloadorg-drill-be851b9eb42faa3c096737daaab0afcbc8c5087e.tar.gz
org-drill-be851b9eb42faa3c096737daaab0afcbc8c5087e.zip
Refactor robot testing
Diffstat (limited to 'robot/basic-run.sh')
-rwxr-xr-xrobot/basic-run.sh49
1 files changed, 49 insertions, 0 deletions
diff --git a/robot/basic-run.sh b/robot/basic-run.sh
new file mode 100755
index 0000000..497f157
--- /dev/null
+++ b/robot/basic-run.sh
@@ -0,0 +1,49 @@
+#!/bin/bash
+
+set -e
+
+function run_drill {
+ ## Org-drill should be running at this point, so give three answers
+ ## with a score of file
+ sleep_big
+
+ echo answer one
+ send_answer
+
+ echo answer two
+ send_answer
+
+ echo answer three
+ send_answer
+
+ ## Press any key to continue
+ echo press any key to continue
+ retn
+ sleep_small
+
+ echo Save file
+ key y
+}
+
+this_dir="$(dirname "$0")"
+source $this_dir/robot.sh
+
+
+launch_emacs $this_dir/basic-run.el
+
+bsmall_sleep=5
+big_sleep=10
+
+{
+ sleep 2
+ find_bot
+
+ ## Run once with default options
+ run_drill
+
+ ## Run once with presentation-prompt-with-typing
+ run_drill
+
+ # kill_emacs
+} || cat robot/failure.txt
+ $EMACS -Q -l $1 &