[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/org dc63cdd220 2/2: org-test-load: Make tests with miss
From: |
ELPA Syncer |
Subject: |
[elpa] externals/org dc63cdd220 2/2: org-test-load: Make tests with missing dependencies more prominent |
Date: |
Wed, 16 Nov 2022 03:58:12 -0500 (EST) |
branch: externals/org
commit dc63cdd220d01e4ed2caa5101f592ffd4b2b68a1
Author: Ihor Radchenko <yantar92@posteo.net>
Commit: Ihor Radchenko <yantar92@posteo.net>
org-test-load: Make tests with missing dependencies more prominent
* testing/org-test.el (org-test-load): Skip test files that throw
'missing-test-dependency. Skipped tests are explicitly listed in test
summary and thus more visible. This also distinguishes such tests
from known bugs.
---
testing/org-test.el | 51 ++++++++++++++++++++++++++-------------------------
1 file changed, 26 insertions(+), 25 deletions(-)
diff --git a/testing/org-test.el b/testing/org-test.el
index 65d157bca2..9bf0746465 100644
--- a/testing/org-test.el
+++ b/testing/org-test.el
@@ -389,31 +389,32 @@ Tramp related features. We mostly follow
(setq org-id-locations-file
(expand-file-name ".test-org-id-locations" org-test-dir))
(cl-flet ((rld (base)
- ;; Recursively load all files, if files throw errors
- ;; then silently ignore the error and continue to the
- ;; next file. This allows files to error out if
- ;; required executables aren't available.
- (mapc
- (lambda (path)
- (if (file-directory-p path)
- (rld path)
- (condition-case nil
- (when (string-match "\\`[A-Za-z].*\\.el\\'"
- (file-name-nondirectory path))
- (let ((feature-name
- (intern
- (file-name-base
- (file-name-nondirectory path)))))
- (require feature-name path)))
- (missing-test-dependency
- (let ((name (intern
- (concat "org-missing-dependency/"
- (file-name-nondirectory
- (file-name-sans-extension path))))))
- (eval `(ert-deftest ,name ()
- :expected-result :failed (should nil))))))))
- (directory-files base 'full
-
"\\`\\([^.]\\|\\.\\([^.]\\|\\..\\)\\).*\\.el\\'"))))
+ ;; Recursively load all files, if files throw errors
+ ;; then silently ignore the error and continue to the
+ ;; next file. This allows files to error out if
+ ;; required executables aren't available.
+ (mapc
+ (lambda (path)
+ (if (file-directory-p path)
+ (rld path)
+ (condition-case nil
+ (when (string-match "\\`[A-Za-z].*\\.el\\'"
+ (file-name-nondirectory path))
+ (let ((feature-name
+ (intern
+ (file-name-base
+ (file-name-nondirectory path)))))
+ (require feature-name path)))
+ (missing-test-dependency
+ (let ((name (intern
+ (concat "org-missing-dependency/"
+ (file-name-nondirectory
+ (file-name-sans-extension
path))))))
+ (eval `(ert-deftest ,name ()
+ (skip-unless nil) ;; Make it prominent.
+ :expected-result :failed (should nil))))))))
+ (directory-files base 'full
+
"\\`\\([^.]\\|\\.\\([^.]\\|\\..\\)\\).*\\.el\\'"))))
(rld (expand-file-name "lisp" org-test-dir))))
(defun org-test-current-defun ()