[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/auctex cc72777 19/26: More ERT tests
From: |
Tassilo Horn |
Subject: |
[elpa] externals/auctex cc72777 19/26: More ERT tests |
Date: |
Fri, 13 Nov 2015 17:00:39 +0000 |
branch: externals/auctex
commit cc72777fd26f2bd75904d1280d08c28113fc1556
Author: Mosè Giordano <address@hidden>
Commit: Mosè Giordano <address@hidden>
More ERT tests
* tests/latex/latex-test.el (LaTeX-math-indent)
(LaTeX-change-environment-with-esc): New tests.
* tests/latex/math-indent-in.tex: New test file.
* tests/latex/math-indent-out.tex: Ditto.
---
ChangeLog | 9 +++++++++
tests/latex/latex-test.el | 35 ++++++++++++++++++++++++++++++++++-
tests/latex/math-indent-in.tex | 17 +++++++++++++++++
tests/latex/math-indent-out.tex | 17 +++++++++++++++++
4 files changed, 77 insertions(+), 1 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 1b94fca..8d03381 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2015-11-11 Mos� Giordano <address@hidden>
+
+ * tests/latex/latex-test.el (LaTeX-math-indent)
+ (LaTeX-change-environment-with-esc): New tests.
+
+ * tests/latex/math-indent-in.tex: New test file.
+
+ * tests/latex/math-indent-out.tex: Ditto.
+
2015-11-10 Mos� Giordano <address@hidden>
* latex.el (LaTeX-fill-break-at-separators): Change default value
diff --git a/tests/latex/latex-test.el b/tests/latex/latex-test.el
index 0ca942a..cc23caf 100644
--- a/tests/latex/latex-test.el
+++ b/tests/latex/latex-test.el
@@ -44,7 +44,11 @@ line and from another directory."
'LaTeX-filling/in
"latex-filling-in.tex"
'LaTeX-filling/out
- "latex-filling-out.tex")
+ "latex-filling-out.tex"
+ 'LaTeX-math-indent/in
+ "math-indent-in.tex"
+ 'LaTeX-math-indent/out
+ "math-indent-out.tex")
(ert-deftest LaTeX-indent-tabular ()
(should (string=
@@ -57,6 +61,20 @@ line and from another directory."
(insert-file-contents LaTeX-indent-tabular-test/out)
(buffer-string)))))
+;; Another test for indentation, but for math mode, see
+;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=20227 Let's keep those tests
+;; separated so it would be easier to find the culprit of a future failure.
+(ert-deftest LaTeX-math-indent ()
+ (should (string=
+ (with-temp-buffer
+ (insert-file-contents LaTeX-math-indent/in)
+ (LaTeX-mode)
+ (indent-region (point-min) (point-max))
+ (buffer-string))
+ (with-temp-buffer
+ (insert-file-contents LaTeX-math-indent/out)
+ (buffer-string)))))
+
;; Test LaTeX code with math modes is indented as expected. This has mostly to
;; do with the value of `LaTeX-fill-break-at-separators' and how
;; `LaTeX-fill-move-to-break-point' handles it. If the test fails, try to look
@@ -73,4 +91,19 @@ line and from another directory."
(insert-file-contents LaTeX-filling/out)
(buffer-string)))))
+;; Test for bug#19281 (https://debbugs.gnu.org/cgi/bugreport.cgi?bug=19281):
+;; make sure AUCTeX is able to insert and modify an environment containing a
+;; TeX-esc and braces in its name.
+(ert-deftest LaTeX-change-environment-with-esc ()
+ (should (string=
+ (with-temp-buffer
+ (LaTeX-mode)
+ (LaTeX-insert-environment (concat TeX-esc "foo{bar}"))
+ (LaTeX-modify-environment "foobar")
+ (buffer-string))
+ (with-temp-buffer
+ (LaTeX-mode)
+ (LaTeX-insert-environment "foobar")
+ (buffer-string)))))
+
;;; latex-test.el ends here
diff --git a/tests/latex/math-indent-in.tex b/tests/latex/math-indent-in.tex
new file mode 100644
index 0000000..16acac6
--- /dev/null
+++ b/tests/latex/math-indent-in.tex
@@ -0,0 +1,17 @@
+\[
+x
+\]
+
+\[
+\begin{split}
+x &= y \\
+y &= z
+\end{split}
+\]
+
+\begin{itemize}
+\item Some text here
+\[
+x
+\]
+\end{itemize}
diff --git a/tests/latex/math-indent-out.tex b/tests/latex/math-indent-out.tex
new file mode 100644
index 0000000..e895be2
--- /dev/null
+++ b/tests/latex/math-indent-out.tex
@@ -0,0 +1,17 @@
+\[
+ x
+\]
+
+\[
+ \begin{split}
+ x &= y \\
+ y &= z
+ \end{split}
+\]
+
+\begin{itemize}
+\item Some text here
+ \[
+ x
+ \]
+\end{itemize}
- [elpa] externals/auctex a2f8bc6 08/26: Fix Texinfo-make-node-list, (continued)
- [elpa] externals/auctex a2f8bc6 08/26: Fix Texinfo-make-node-list, Tassilo Horn, 2015/11/13
- [elpa] externals/auctex 52275f9 03/26: Improve style., Tassilo Horn, 2015/11/13
- [elpa] externals/auctex b3153ec 16/26: Add function for reverting document buffer, Tassilo Horn, 2015/11/13
- [elpa] externals/auctex 4527e8a 10/26: Update documentation., Tassilo Horn, 2015/11/13
- [elpa] externals/auctex f52479b 11/26: Improve checking of a TeX distribution and make it optional, Tassilo Horn, 2015/11/13
- [elpa] externals/auctex fb09c26 06/26: Warn about duplicate texinfo nodes, Tassilo Horn, 2015/11/13
- [elpa] externals/auctex a4c6a19 21/26: Update release-related Makefile rules, Tassilo Horn, 2015/11/13
- [elpa] externals/auctex cb4e33e 12/26: Set output extension for Texinfo files, Tassilo Horn, 2015/11/13
- [elpa] externals/auctex d465076 22/26: Update for upcoming release, Tassilo Horn, 2015/11/13
- [elpa] externals/auctex 5179308 18/26: Change default value of LaTeX-fill-break-at-separators, Tassilo Horn, 2015/11/13
- [elpa] externals/auctex cc72777 19/26: More ERT tests,
Tassilo Horn <=
- [elpa] externals/auctex df7dbbd 23/26: Release_11.89, Tassilo Horn, 2015/11/13
- [elpa] externals/auctex 3aa4bdb 17/26: Add ChangeLog entry, Tassilo Horn, 2015/11/13
- [elpa] externals/auctex 0c9b98a 14/26: Fix compatibility with XEmacs in tex-info.el, Tassilo Horn, 2015/11/13
- [elpa] externals/auctex 11af8e6 20/26: Improve has-no-display-manager predicate, Tassilo Horn, 2015/11/13
- [elpa] externals/auctex 7363de1 26/26: Adapt to ChangeLog dropping, Tassilo Horn, 2015/11/13
- [elpa] externals/auctex 7427d62 24/26: Drop ChangeLog, Tassilo Horn, 2015/11/13
- [elpa] externals/auctex 590651f 25/26: Merge branch 'master' into elpa, Tassilo Horn, 2015/11/13