[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/org-drill 78d3472033 246/251: add cram-mode test
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/org-drill 78d3472033 246/251: add cram-mode test |
Date: |
Mon, 17 Jan 2022 18:59:22 -0500 (EST) |
branch: elpa/org-drill
commit 78d34720331d44d586ca34733d37f9feef35ffe9
Author: Brandon Webster <brandon.webster@socrata.com>
Commit: Brandon Webster <brandon.webster@socrata.com>
add cram-mode test
---
robot/cram-run.el | 24 ++++++++++++++++++++++++
robot/cram-run.sh | 39 +++++++++++++++++++++++++++++++++++++++
2 files changed, 63 insertions(+)
diff --git a/robot/cram-run.el b/robot/cram-run.el
new file mode 100644
index 0000000000..a754013df4
--- /dev/null
+++ b/robot/cram-run.el
@@ -0,0 +1,24 @@
+(load-file "robot/robot.el")
+(load-file "org-drill.el")
+
+;; setup
+(copy "basic-run.org" "cram-run-copy.org")
+
+;; normal run
+(find "cram-run-copy.org")
+(org-drill)
+(set-buffer-modified-p nil)
+(kill-buffer)
+(robot-check-cards-seen 3)
+
+;; cram run with all cards reviewed less than `org-drill-cram-hours`
+;; ago, so we expect no new cards to be seen
+(find "cram-run-copy.org")
+(org-drill-cram)
+(robot-check-cards-seen 3)
+
+;; cram run that should include all cards, so we expect seen cards to
+;; double
+(setq org-drill-cram-hours 0)
+(org-drill-cram)
+(robot-check-cards-seen-and-die 6)
diff --git a/robot/cram-run.sh b/robot/cram-run.sh
new file mode 100755
index 0000000000..a4d6ec9b5a
--- /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
- [nongnu] elpa/org-drill 11dd2d4e23 235/251: Merge branch 'master' into 'fix/latex-overlays', (continued)
- [nongnu] elpa/org-drill 11dd2d4e23 235/251: Merge branch 'master' into 'fix/latex-overlays', ELPA Syncer, 2022/01/17
- [nongnu] elpa/org-drill 6ad53cdf21 217/251: Update documentation, ELPA Syncer, 2022/01/17
- [nongnu] elpa/org-drill 6938a466e0 208/251: Update documentation, ELPA Syncer, 2022/01/17
- [nongnu] elpa/org-drill b6a4b4f103 238/251: Merge branch 'master' into 'master', ELPA Syncer, 2022/01/17
- [nongnu] elpa/org-drill 749e012e65 216/251: Merge branch 'fix/drill-matching' into 'master', ELPA Syncer, 2022/01/17
- [nongnu] elpa/org-drill 96d7c199a0 221/251: Merge branch 'patch-1' into 'master', ELPA Syncer, 2022/01/17
- [nongnu] elpa/org-drill 35c1ce3499 248/251: Merge branch 'branweb/org-mode-version' into 'master', ELPA Syncer, 2022/01/17
- [nongnu] elpa/org-drill 7dece4a5e4 229/251: Fix org-get-tags compatability, ELPA Syncer, 2022/01/17
- [nongnu] elpa/org-drill 0e0f7bcddd 242/251: Bump org-mode version to 9.3, ELPA Syncer, 2022/01/17
- [nongnu] elpa/org-drill e55415221e 249/251: Fix autoloads, ELPA Syncer, 2022/01/17
- [nongnu] elpa/org-drill 78d3472033 246/251: add cram-mode test,
ELPA Syncer <=
- [nongnu] elpa/org-drill b431634c3e 018/251: Bug fix: when drill sessions span more than one file, display items in the other files correctly., ELPA Syncer, 2022/01/17
- [nongnu] elpa/org-drill eb370c7405 077/251: - Moved a line with side effects to earlier in the file, possibly fixing an, ELPA Syncer, 2022/01/17
- [nongnu] elpa/org-drill 0184220926 150/251: Replace drill-typed-answer, ELPA Syncer, 2022/01/17
- [nongnu] elpa/org-drill b7b295c80b 122/251: Update gitignore, ELPA Syncer, 2022/01/17
- [nongnu] elpa/org-drill 2832be1ad4 153/251: Replace more non-namespaced commands, ELPA Syncer, 2022/01/17
- [nongnu] elpa/org-drill b0ee414c16 177/251: Fix call to removed variable, ELPA Syncer, 2022/01/17
- [nongnu] elpa/org-drill 90d777bd55 183/251: Fix more byte compile errors, ELPA Syncer, 2022/01/17
- [nongnu] elpa/org-drill 3c356dfc5a 179/251: Fix robot testing and reference to drill-typed-answer, ELPA Syncer, 2022/01/17
- [nongnu] elpa/org-drill 8c36f488e2 162/251: Spanish card fixes and full test set, ELPA Syncer, 2022/01/17
- [nongnu] elpa/org-drill 29b4faa174 190/251: Fix compat call, ELPA Syncer, 2022/01/17