Hi,
test-org-tests/find-duplicates
is yelling at me with a perfectly valid test:
----
(ert-deftest test-ox-latex/table-no-caption ()
"Test that only captions add a double backslash."
(org-test-with-exported-text
'latex
"#+LATEX_HEADER: \\usepackage{tabu}
This is a test.
#+ATTR_LATEX: :environment longtabu :align |l|l|
#+NAME: 1
#+CAPTION: This is table 1
| 100 | test |
#+ATTR_LATEX: :environment longtabu :align |l|l|
#+NAME: 1
| 100 | test |
"
(goto-char (point-min))
(should (search-forward-regexp "^\\\\begin{longtabu}"))
(should (search-forward-regexp "^\\\\caption{"))
(should (search-forward-regexp "^\\\\\\\\"))
(should (search-forward-regexp "^100 & test"))
(should (search-forward-regexp "^\\\\begin{longtabu}"))
(save-excursion
(should-not (search-forward-regexp "^\\\\caption{" nil t)))
(save-excursion
(should-not (search-forward-regexp "^\\\\\\\\" nil t)))
(should (search-forward-regexp "^100 & test"))))
----
I'm generating two tables in a single test and check that the behaviour
is not the same, since one has a caption and the other doesn't.
Puzzled, /PA
--
Pedro A. Aranda
ox-latex & ox-beamer maintainer
Sagen's Paradeiser! (ORF: Als Radiohören gefährlich war) => write BE!
IA: onomatopeya del rebuzno
2nd year of the New Koprocracy