[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Failing tests
From: |
Kévin Le Gouguec |
Subject: |
Re: Failing tests |
Date: |
Mon, 01 Jun 2020 16:48:15 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
Kyle Meyer <kyle@kyleam.com> writes:
>> I think I've narrowed this down to org-open-file running "less
>> examples/att1/fileA" instead of visiting this file.
> [...]
>> Let-binding org-file-apps to '(("." . emacs)) makes the tests pass, but
>> I don't know if that's the way we want to solve this.
>
> Thanks for looking into the failures. Let-binding org-file-apps sounds
> like a good approach to me. Rather than the catch-all regular
> expression, I believe the value could be ((t . emacs)).
Absolutely. I've attached a patch to that effect.
I wonder though, shouldn't org-open-file always visit text/plain files?
Why would we ever want to send those to an external viewer?
I think this would need special-casing inside org-open-file, since I
don't see a way to catch all text/plain files with org-file-apps.
0001-Make-tests-robust-with-respect-to-mailcap-entries.patch
Description: Text Data
The diff looks big, but most of it is just re-indentation. Here is the
signal beneath the whitespace noise:
diff --git a/testing/lisp/test-ob-tangle.el b/testing/lisp/test-ob-tangle.el
index 2283037fc..35490f538 100644
--- a/testing/lisp/test-ob-tangle.el
+++ b/testing/lisp/test-ob-tangle.el
@@ -125,6 +125,7 @@
(ert-deftest ob-tangle/jump-to-org ()
"Test `org-babel-tangle-jump-to-org' specifications."
;; Standard test.
+ (let ((org-file-apps '((t . emacs))))
(should
(equal
"* H\n#+begin_src emacs-lisp\n1\n#+end_src"
@@ -197,7 +197,7 @@
(format ";; [[file:%s][H:1]]\n<point>1\n;; H:1 ends here\n"
(file-name-nondirectory file))
(org-babel-tangle-jump-to-org)
- (buffer-string)))))))
+ (buffer-string))))))))
(ert-deftest ob-tangle/nested-block ()
"Test tangling of org file with nested block."
diff --git a/testing/lisp/test-org-attach.el b/testing/lisp/test-org-attach.el
index f910526c2..168e5d56f 100644
--- a/testing/lisp/test-org-attach.el
+++ b/testing/lisp/test-org-attach.el
@@ -30,6 +30,7 @@
(ert-deftest test-org-attach/dir ()
"Test `org-attach-get' specifications."
+ (let ((org-file-apps '((t . emacs))))
(should (equal "Text in fileA\n"
(org-test-in-example-file org-test-attachments-file
(goto-char 157) ;; First attachment link
@@ -103,7 +104,7 @@
;; tree. This can potentially be revised. But it is also
;; pretty clean. DIR is always higher in priority than ID
right
;; now, no matter the depth in the tree.
- (org-attach-file-list (org-attach-dir)))))))
+ (org-attach-file-list (org-attach-dir))))))))
(ert-deftest test-org-attach/dired-attach-to-next-best-subtree/1 ()
"Attach file at point in dired to subtree."