[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [ANN] lisp/ob-tangle-sync.el
From: |
Ihor Radchenko |
Subject: |
Re: [ANN] lisp/ob-tangle-sync.el |
Date: |
Tue, 18 Jul 2023 08:47:37 +0000 |
Mehmet Tekman <mtekman89@gmail.com> writes:
>> ... I will rewrite to to conform to the
>> `org-test-with-temp-text' examples.
>
> So I've just rewritten the `merge-params' testing function I
> wrote before, this time using the `org-test-with-temp-text'
> method/macro.
Side note: You are re-implementing the already available ERT features
for failed test reporting. Instead of controlling which tests failed
manually, you should better follow the example of all other tests and
simply use a sequence of `should'/`should-not' forms.
If you did that, ERT would by itself report which tests fail and why.
> I seem to be getting 5 failing tests for reasons that I'm not
> quite sure why. I've tested it against upstream/main, but still
> getting the same errors. Maybe you can try it and see where I'm
> going wrong?
I am getting the following failures:
6 Failed Blocks: (tangle-file-with-spaces
override-document-and-heading-tfile-with-yes
ignore-document-header-take-last-tfile-and-sync-action
inherit-document-tfile-take-only-last-local-sync-action
inherit-document-header-with-local-sync-action inherit-document-header-args)
> + (let ((idtest-alist '((inherit-document-header-args
> + :tangle "\
> +#+PROPERTY: header-args :tangle /tmp/default_tangle.txt
> +* One
> +#+begin_src conf
> + (:tangle . /tmp/default_tangle.txt)
> +#+end_src")
This is failing because of subtlety in `org-test-with-temp-text' that
inserts text after activating org-mode.
PROPERTY lines are only computed when org-mode is activated, unless you
explicitly call `org-set-regexps-and-options' to refresh them.
Your code does not refresh those and PROPERTY line is not being handled
by Org.
Same story for other tests with PROPERTY.
> + (tangle-file-with-spaces
> + :tangle "\
> +* One
> +:PROPERTIES:
> +:header-args: :tangle \"foo.txt\"
> +:END:
> +** Two
> +#+begin_src :tangle \"file with spaces.txt\"
> + (:tangle . \"file with spaces.txt\")
> +#+end_src")))
This fails because you did not provide LANG for source block.
override-document-and-heading-tfile-with-yes test is also missing LANG.
P.S. There going to be Emacs meetup this Saturday, July 22
(https://emacs-apac.gitlab.io/announcements/july-2023/). I plan to be
there and, if you need it, we can try to resolve difficulties in more
interactive way.
--
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>
- Re: [ANN] lisp/ob-tangle-sync.el, Ihor Radchenko, 2023/07/15
- Re: [ANN] lisp/ob-tangle-sync.el, Mehmet Tekman, 2023/07/16
- Re: [ANN] lisp/ob-tangle-sync.el, Mehmet Tekman, 2023/07/17
- Re: [ANN] lisp/ob-tangle-sync.el,
Ihor Radchenko <=
- Re: [ANN] lisp/ob-tangle-sync.el, Mehmet Tekman, 2023/07/21
- Re: [ANN] lisp/ob-tangle-sync.el, Ihor Radchenko, 2023/07/22
- Re: [ANN] lisp/ob-tangle-sync.el, Mehmet Tekman, 2023/07/25
- Re: [ANN] lisp/ob-tangle-sync.el, Ihor Radchenko, 2023/07/25
- Re: [ANN] lisp/ob-tangle-sync.el, Mehmet Tekman, 2023/07/31
- Re: [ANN] lisp/ob-tangle-sync.el, Ihor Radchenko, 2023/07/31
- Re: [ANN] lisp/ob-tangle-sync.el, Mehmet Tekman, 2023/07/31