diff options
| -rw-r--r-- | compat-tests.el | 7 | ||||
| -rw-r--r-- | compat.el | 3 |
2 files changed, 9 insertions, 1 deletions
diff --git a/compat-tests.el b/compat-tests.el index 5c76084..79dcc85 100644 --- a/compat-tests.el +++ b/compat-tests.el @@ -45,6 +45,13 @@ (defmacro should-equal (a b) `(should (equal ,a ,b))) +(ert-deftest compat-loaded-features () + (let ((version 0)) + (while (< version 30) + (should-equal (> version emacs-major-version) + (featurep (intern (format "compat-%s" version)))) + (setq version (1+ version))))) + (ert-deftest compat-function () (let ((sym (compat-function plist-put)) list) (should sym) @@ -42,7 +42,8 @@ ;;; Code: -(when (< emacs-major-version 29) (require 'compat-29)) +(when (eval-when-compile (< emacs-major-version 29)) + (require 'compat-29)) (defmacro compat-function (fun) "Return compatibility function symbol for FUN. |
