emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] org-babel-demarcate-block: split using element API


From: gerard . vermeulen
Subject: Re: [PATCH] org-babel-demarcate-block: split using element API
Date: Mon, 15 Jan 2024 09:37:48 +0000



On 14.01.2024 20:18, gerard.vermeulen@posteo.net wrote:
On 14.01.2024 13:16, Ihor Radchenko wrote:
gerard.vermeulen@posteo.net writes:
[...]
I tried make test and the tests are still failing with this new patch:

1 unexpected results:
   FAILED  test-ob/demarcate-block  ((should (string= region-text
(org-trim (nth 1 info)))) :form (string= "mark this line as region"
"") :value nil :explanation (arrays-of-different-length 24 0 "mark
this line as region" "" first-mismatch-at 0))

This is a tough lesson: the tests pass always on my system.

I think the failure you see is related to a problem marking a region
in my test code (wish: support in `org-test-with-temp-text' for
"<mark>" besides "<point>", but maybe that depends on ERT), else
the problem would have shown up while testing the patch interactively.

I think that I have improved my region marking code by using "<point>"
in the temp-text as a start. Then, I only have to find where to set mark,
and eventually exchange point and mark.

The test code now checks (mark) in the 3 places where a region is marked. This looks superfluous if the code is really robust, but at least it checks
whether the region marking is (or was) the problem.


To converge faster, I have split the test into 6 tests:

test-ob/demarcate-block-split-duplication
test-ob/demarcate-block-split-prefix-point
test-ob/demarcate-block-split-prefix-region
test-ob/demarcate-block-split-user-errors
test-ob/demarcate-block-wrap-point
test-ob/demarcate-block-wrap-region

The test failure on your system was due to the sub-test that is now
test-ob/demarcate-block-wrap-region

Regards -- Gerard

Attachment: 0001-org-babel-demarcate-block-split-using-element-API.patch
Description: Binary data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]