Karthik Chikmagalur <[email protected]> writes:

> I'm working on org-latex-preview actively this week, so even incremental
> feedback will be helpful as I can get started on it.

Now, test-org-latex-preview.el

> (ert-deftest test-org-latex-preview/assert ()
>   (should t))

This is redundant.

> (ert-deftest test-org-latex-preview/collect-fragments-inline ()
>   "Test LaTeX fragment collection"
>   (let ((elements
>          '((latex-fragment
>             (:value "\\( q \\ge 0 \\)" :begin 770 :end 784 :post-blank 1 
> :parent
>              (paragraph
>               (:begin 765 :end 918 :contents-begin 765 :contents-end 918 
> :post-blank 0 :post-affiliated 765 :mode nil :granularity element :parent

Hard-coding buffer position is questionable. Maybe there is a better way?
In any case, this test is very bad. What if we change the org-element structure?

>      (goto-char 255)
Same problem with hard-coded buffer positions.
In this case, something like re-search-forward will be much better.

test-org-latex-preview/place-previews-1 and 
test-org-latex-preview/place-previews-all
have very similar code. Can they be merged together?

-- 
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