branch: externals-release/org commit 9044b300ee68194292b497375435cb616604cfbc Author: Ihor Radchenko <yanta...@gmail.com> Commit: Ihor Radchenko <yanta...@gmail.com>
org-test: Fix ERC errors using latest Emacs master * testing/lisp/test-ob-C.el: * testing/lisp/test-ob-awk.el: * testing/lisp/test-ob-sed.el: Add missing provide. * testing/lisp/test-property-inheritance.el: Fix incorrect feature name. * testing/org-test.el (org-test-load): Use `require' instead of `load-file' to load tests. `load-file' can lead to duplicate test definitions that now trigger ERC errors. See https://lists.gnu.org/archive/html/bug-gnu-emacs/2021-11/msg01968.html --- testing/lisp/test-ob-C.el | 1 + testing/lisp/test-ob-awk.el | 3 +++ testing/lisp/test-ob-sed.el | 2 +- testing/lisp/test-property-inheritance.el | 3 +-- testing/org-test.el | 6 +++++- 5 files changed, 11 insertions(+), 4 deletions(-) diff --git a/testing/lisp/test-ob-C.el b/testing/lisp/test-ob-C.el index 12a5e54..5f1dd1a 100644 --- a/testing/lisp/test-ob-C.el +++ b/testing/lisp/test-ob-C.el @@ -183,4 +183,5 @@ ("Friday" "friday")) (org-babel-execute-src-block)))))) +(provide 'test-ob-C) ;;; test-ob-C.el ends here diff --git a/testing/lisp/test-ob-awk.el b/testing/lisp/test-ob-awk.el index 7f3c0f3..21151b2 100644 --- a/testing/lisp/test-ob-awk.el +++ b/testing/lisp/test-ob-awk.el @@ -46,3 +46,6 @@ (org-test-at-id "9e998b2a-3581-43fe-b26d-07d3c507b86a" (org-babel-next-src-block 4) (should (equal '(("a" "b" "c")) (org-babel-execute-src-block))))) + +(provide 'test-ob-awk) +;;; test-ob-awk.el ends here diff --git a/testing/lisp/test-ob-sed.el b/testing/lisp/test-ob-sed.el index d8e5cac..0c0515e 100644 --- a/testing/lisp/test-ob-sed.el +++ b/testing/lisp/test-ob-sed.el @@ -58,5 +58,5 @@ (buffer-string))))))) - +(provide 'test-ob-sed) ;;; test-ob-sed ends here diff --git a/testing/lisp/test-property-inheritance.el b/testing/lisp/test-property-inheritance.el index c00ad6c..d3c3b0c 100644 --- a/testing/lisp/test-property-inheritance.el +++ b/testing/lisp/test-property-inheritance.el @@ -45,6 +45,5 @@ (org-babel-next-src-block 3) (should (= 6 (org-babel-execute-src-block))))) -(provide 'test-ob-R) - +(provide 'test-property-inheritance) ;;; test-property-inheritance.el ends here diff --git a/testing/org-test.el b/testing/org-test.el index 30adb97..3565dd0 100644 --- a/testing/org-test.el +++ b/testing/org-test.el @@ -373,7 +373,11 @@ setting `pp-escape-newlines' to nil manually." (condition-case err (when (string-match "^[A-Za-z].*\\.el$" (file-name-nondirectory path)) - (load-file 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/"