[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/auctex ac02ed2 02/57: Extend test for new column counti
From: |
Tassilo Horn |
Subject: |
[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}
\begin{document}
Standard LaTeX tabular:
@@ -33,4 +33,52 @@ Standard LaTeX tabular*:
1 & 2 & 3 & LaTeX-insert-item
\end{tabular*}
+tabularx:
+\begin{tabularx}{1.0\linewidth}{llX}
+ 1 & 2 & LaTeX-insert-item
+\end{tabularx}
+
address@hidden>{\tiny\hfill}l<address@hidden
+ 1 & 2 & LaTeX-insert-item
+\end{tabularx}
+
+\begin{tabularx}{1.0\linewidth}[t]{*{3}{|>{\tiny\hfill}X<{\hfill}}l}
+ 1 & 2 & 3 & LaTeX-insert-item
+\end{tabularx}
+
+longtable:
+\begin{longtable}[l]{llr}
+ \caption{Some caption}\\
+ 1 & 2 & LaTeX-insert-item
+\end{longtable}
+
+\begin{longtable}[c]{*{3}{l}r}
+ \caption{Some caption}\\
+ 1 & 2 & 3 & LaTeX-insert-item
+\end{longtable}
+
+\begin{longtable}[r]{*{3}{lc*{2}{l}} r}
+ \caption{Some caption}\\
+ 1 & 2 & 3 & 4 & 5 & 6 & 7 & 8 & 9 & 10 & 11 & 12 & LaTeX-insert-item
+\end{longtable}
+
+dcolumn:
+\begin{tabular}{D{,}{,}{2}D{,}{,}{2}D{,}{,}{2}}
+ 1 & 2 & LaTeX-insert-item
+\end{tabular}
+
+\begin{tabular}{*{3}{D{,}{,}{2}}}
+ 1 & 2 & LaTeX-insert-item
+\end{tabular}
+
+siunitx:
+\begin{tabular}{%
+ s
+ S[table-number-alignment = center]
+ s[table-number-alignment = left]
+ S[table-number-alignment = right]
+ }
+ 1 & 2 & 3 & LaTeX-insert-item
+\end{tabular}
+
\end{document}
diff --git a/tests/latex/tabular-count-ampersands-out.tex
b/tests/latex/tabular-count-ampersands-out.tex
index 1163637..add9fd8 100644
--- a/tests/latex/tabular-count-ampersands-out.tex
+++ b/tests/latex/tabular-count-ampersands-out.tex
@@ -1,5 +1,5 @@
\documentclass{article}
-% \usepackage{tabularx,tabulary,longtable}
+\usepackage{tabularx,tabulary,longtable,dcolumn,siunitx}
\begin{document}
Standard LaTeX tabular:
@@ -40,4 +40,61 @@ Standard LaTeX tabular*:
&&&
\end{tabular*}
+tabularx:
+\begin{tabularx}{1.0\linewidth}{llX}
+ 1 & 2 & LaTeX-insert-item \\
+ &&
+\end{tabularx}
+
address@hidden>{\tiny\hfill}l<address@hidden
+ 1 & 2 & LaTeX-insert-item \\
+ &&
+\end{tabularx}
+
+\begin{tabularx}{1.0\linewidth}[t]{*{3}{|>{\tiny\hfill}X<{\hfill}}l}
+ 1 & 2 & 3 & LaTeX-insert-item \\
+ &&&
+\end{tabularx}
+
+longtable:
+\begin{longtable}[l]{llr}
+ \caption{Some caption}\\
+ 1 & 2 & LaTeX-insert-item \\
+ &&
+\end{longtable}
+
+\begin{longtable}[c]{*{3}{l}r}
+ \caption{Some caption}\\
+ 1 & 2 & 3 & LaTeX-insert-item \\
+ &&&
+\end{longtable}
+
+\begin{longtable}[r]{*{3}{lc*{2}{l}} r}
+ \caption{Some caption}\\
+ 1 & 2 & 3 & 4 & 5 & 6 & 7 & 8 & 9 & 10 & 11 & 12 & LaTeX-insert-item \\
+ &&&&&&&&&&&&
+\end{longtable}
+
+dcolumn:
+\begin{tabular}{D{,}{,}{2}D{,}{,}{2}D{,}{,}{2}}
+ 1 & 2 & LaTeX-insert-item \\
+ &&
+\end{tabular}
+
+\begin{tabular}{*{3}{D{,}{,}{2}}}
+ 1 & 2 & LaTeX-insert-item \\
+ &&
+\end{tabular}
+
+siunitx:
+\begin{tabular}{%
+ s
+ S[table-number-alignment = center]
+ s[table-number-alignment = left]
+ S[table-number-alignment = right]
+ }
+ 1 & 2 & 3 & LaTeX-insert-item \\
+ &&&
+\end{tabular}
+
\end{document}
- [elpa] externals/auctex updated (a580432 -> 3dca7c4), Tassilo Horn, 2017/01/11
- [elpa] externals/auctex 061aaf5 03/57: Mention improvements to `LaTeX-array-count-columns' in news, Tassilo Horn, 2017/01/11
- [elpa] externals/auctex ec3996d 08/57: Query for optional float position, Tassilo Horn, 2017/01/11
- [elpa] externals/auctex def20e7 05/57: Make AUCTeX and RefTeX aware of file loading macro \subfile, Tassilo Horn, 2017/01/11
- [elpa] externals/auctex a55b66d 07/57: Improve inserting arguments of \captionof macro, Tassilo Horn, 2017/01/11
- [elpa] externals/auctex ac02ed2 02/57: Extend test for new column counting code with style files loaded,
Tassilo Horn <=
- [elpa] externals/auctex bef4873 22/57: Set `reftex-set-cite-format' to biblatex or natbib, Tassilo Horn, 2017/01/11
- [elpa] externals/auctex c3a21f2 04/57: Print only first line of the message in error overview, Tassilo Horn, 2017/01/11
- [elpa] externals/auctex 48d397c 17/57: Add starred version of \citeauthor and \Citeauthor, Tassilo Horn, 2017/01/11
- [elpa] externals/auctex 89ea0e4 19/57: Fix name of macros \lcnamecref and \lcnamecrefs, Tassilo Horn, 2017/01/11
- [elpa] externals/auctex bb390fe 18/57: Add fontification for varioref's referencing macros, Tassilo Horn, 2017/01/11
- [elpa] externals/auctex 8186490 06/57: Fix documentation of TeX-arg-file, Tassilo Horn, 2017/01/11
- [elpa] externals/auctex 01da194 23/57: ; * style/titletoc.el ("titletoc"): Use `TeX-arg-length'., Tassilo Horn, 2017/01/11
- [elpa] externals/auctex 1addc62 30/57: Use RefTeX for multiple citations in biblatex, Tassilo Horn, 2017/01/11
- [elpa] externals/auctex 890163e 26/57: Bring back multi-level script font-locking, Tassilo Horn, 2017/01/11
- [elpa] externals/auctex 5ddbd04 12/57: Add new style/titleps.el, Tassilo Horn, 2017/01/11