auctex-diffs
[Top][All Lists]
Advanced

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

[AUCTeX-diffs] [elpa] externals/auctex ac02ed2 02/57: Extend test for ne


From: Tassilo Horn
Subject: [AUCTeX-diffs] [elpa] externals/auctex ac02ed2 02/57: Extend test for new column counting code with style files loaded
Date: Wed, 11 Jan 2017 18:01:37 +0000 (UTC)

branch: externals/auctex
commit ac02ed24635e988f65d0ca84b084f5a9f10680dd
Author: Arash Esbati <address@hidden>
Commit: Arash Esbati <address@hidden>

    Extend test for new column counting code with style files loaded
    
    * tests/latex/tabular-count-ampersands-out.tex:
    * tests/latex/tabular-count-ampersands-in.tex: Add tests for
    tabularx, tabulary, longtable, dcolumn, siunitx constructs.
    
    * tests/latex/latex-test.el
    (LaTeX-count-ampersands-inserted-in-tabular): Set `TeX-parse-self'
    to t in order to load style files in the test.  Thanks to Mosè
    Giordano for enabling this feature.
---
 tests/latex/latex-test.el                    |    4 +-
 tests/latex/tabular-count-ampersands-in.tex  |   50 +++++++++++++++++++++-
 tests/latex/tabular-count-ampersands-out.tex |   59 +++++++++++++++++++++++++-
 3 files changed, 110 insertions(+), 3 deletions(-)

diff --git a/tests/latex/latex-test.el b/tests/latex/latex-test.el
index e8d8900..205af00 100644
--- a/tests/latex/latex-test.el
+++ b/tests/latex/latex-test.el
@@ -118,11 +118,13 @@ line and from another directory."
              (buffer-string)))))
 
 ;; Test for inserting &'s with `M-RET' in various tabular environment.
-;; FIXME: One thing missing is running style hooks while running the test.
+;; Following styles are loaded: tabularx, tabulary, longtable,
+;; dcolumn, siunitx
 (ert-deftest LaTeX-count-ampersands-inserted-in-tabular ()
   (should (string=
           (with-temp-buffer
             (insert-file-contents tabular-count-ampersands/in)
+            (setq TeX-parse-self t)
             (LaTeX-mode)
             (goto-char (point-min))
             ;; Do not ask for opt. argument in (TeX-insert-macro "\"):
diff --git a/tests/latex/tabular-count-ampersands-in.tex 
b/tests/latex/tabular-count-ampersands-in.tex
index 97bc5f8..28c9bc6 100644
--- a/tests/latex/tabular-count-ampersands-in.tex
+++ b/tests/latex/tabular-count-ampersands-in.tex
@@ -1,5 +1,5 @@
 \documentclass{article}
-% \usepackage{tabularx,tabulary,longtable}
+\usepackage{tabularx,tabulary,longtable,dcolumn,siunitx}
 egin{document}
 
 Standard LaTeX tabular:
@@ -33,4 +33,52 @@ Standard LaTeX tabular*:
   1 & 2 & 3 & LaTeX-insert-item
 \end{tabular*}
 
+tabularx:
+egin{tabularx}{1.0\linewidth}{llX}
+  1 & 2 & LaTeX-insert-item
+\end{tabularx}
+
address@hidden>{        iny\hfill}l<address@hidden
+  1 & 2 & LaTeX-insert-item
+\end{tabularx}
+
+egin{tabularx}{1.0\linewidth}[t]{*{3}{|>{     iny\hfill}X<{\hfill}}l}
+  1 & 2 & 3 & LaTeX-insert-item
+\end{tabularx}
+
+longtable:
+egin{longtable}[l]{llr}
+



reply via email to

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