From ec2c168797380c7e41c13a9260c79139bed3300c Mon Sep 17 00:00:00 2001 From: Brandon Webster Date: Sun, 12 Apr 2020 09:18:24 -0700 Subject: add cram-mode test --- robot/cram-run.el | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 robot/cram-run.el (limited to 'robot/cram-run.el') diff --git a/robot/cram-run.el b/robot/cram-run.el new file mode 100644 index 0000000..a754013 --- /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) -- cgit v1.2.3