aboutsummaryrefslogtreecommitdiff
path: root/robot/cram-run.sh
diff options
context:
space:
mode:
authorBrandon Webster <brandon.webster@socrata.com>2020-04-12 09:18:24 -0700
committerBrandon Webster <brandon.webster@socrata.com>2020-04-12 09:18:24 -0700
commitec2c168797380c7e41c13a9260c79139bed3300c (patch)
tree1e22df31dddabf694fee245ad3689311d4d852b7 /robot/cram-run.sh
parent9e337363f6dc11ff560a618336f31d03e15aebf4 (diff)
downloadorg-drill-ec2c168797380c7e41c13a9260c79139bed3300c.tar.gz
org-drill-ec2c168797380c7e41c13a9260c79139bed3300c.zip
add cram-mode test
Diffstat (limited to 'robot/cram-run.sh')
-rwxr-xr-xrobot/cram-run.sh39
1 files changed, 39 insertions, 0 deletions
diff --git a/robot/cram-run.sh b/robot/cram-run.sh
new file mode 100755
index 0000000..a4d6ec9
--- /dev/null
+++ b/robot/cram-run.sh
@@ -0,0 +1,39 @@
+#!/usr/bin/env bash
+
+set -e
+
+this_dir="$(dirname "$0")"
+source ${this_dir}/robot.sh
+
+card_no=3
+
+# cram mode doesn't modify the buffer so there is no save prompt
+function run_drill_no_save {
+ sleep_small
+
+ for i in `seq 1 ${card_no}`;
+ do
+ echo Answer: "$i"
+ send_answer
+ done
+
+ echo press any key to continue
+ retn
+}
+
+function run_drill {
+ run_drill_no_save
+ echo Save file
+ key y
+}
+
+
+launch_emacs ${this_dir}/cram-run.el
+
+{
+ find_bot
+ run_drill
+ retn
+ run_drill_no_save
+ wait_emacs
+} || cat robot/failure.txt