Ihor Radchenko <yanta...@posteo.net> writes:

dmg <d...@turingmachine.org> writes:

> I am sorry I wasted your time. Please see attached.
>
> 1. I have reworded and reformatted the commit log
>
> 2. I have added TINYCHANGE
>
> 3. For the test, I have corrected the local function, and instead of using
> point, I am extracting the first few characters of each headline.  It makes
> it easier to create new tests. Thank you for the suggestion

Thanks!

>> +  (let
>> +      ;; org-map-region does not return anything so we need to
>
> `org-map-region'

You forgot to address this comment.

> Subject: [PATCH] org.el: make `org-map-region' properly set point at first
>  heading

I suggest emphasizing more that it is a bugfix:
org-map-region: Fix not setting point at `bol' at the first visited heading
 
> +(ert-deftest test-org/map-region ()
> +  "Test `org-map-region'."

Since you are trying to test the whole function, it will make sense to
test BEG end END arguments as well. Not just tests scanning the whole
buffer.

> +       (equal (list "* Lev" "** Le" "* Lev" "** Le")
> +           (org-test-with-temp-text "
> +:PROPERTIES:
> +:ID:       some-id
> +:END:
> +* Level 1
> +
> +Some text
> +
> +** Level 2
> +
> +More text
> +
> +* Level 1 again
> +
> +** Level 2 again

I do not think that we need that many test cases.
Maybe 1 for mapping the whole buffer and extra for testing BEG/END
arguments and maybe narrowing.

-- 
Ihor Radchenko // yantar92,
Org mode maintainer,
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>

Reply via email to