blob: ff1b4b18fe3158e430414663e7832704bfe00c96 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
;;; test-org-drill-session-keys.el --- Tests for customizable session keys -*- lexical-binding: t; -*-
;;; Commentary:
;; The session-control keys (quit/edit/help/skip/tags) are defcustoms so they
;; can be rebound through customize-group (upstream issue #35), while keeping
;; their historical default characters.
;;; Code:
(require 'ert)
(require 'org-drill)
(defconst test-org-drill-session-key-defaults
'((org-drill--quit-key . ?q)
(org-drill--edit-key . ?e)
(org-drill--help-key . ??)
(org-drill--skip-key . ?s)
(org-drill--tags-key . ?t))
"Each session-control key variable and its historical default character.")
(ert-deftest test-org-drill-session-keys-are-customizable ()
"Each session-control key is a defcustom, so customize-group can set it."
(dolist (cell test-org-drill-session-key-defaults)
(should (custom-variable-p (car cell)))))
(ert-deftest test-org-drill-session-keys-keep-their-defaults ()
"Promoting to defcustom does not change the default bindings."
(dolist (cell test-org-drill-session-key-defaults)
(should (eq (cdr cell) (default-value (car cell))))))
(provide 'test-org-drill-session-keys)
;;; test-org-drill-session-keys.el ends here
|