auctex-diffs
[Top][All Lists]
Advanced

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

[AUCTeX-diffs] GNU AUCTeX branch, master, updated. cc72777fd26f2bd75904d


From: Mosè Giordano
Subject: [AUCTeX-diffs] GNU AUCTeX branch, master, updated. cc72777fd26f2bd75904d1280d08c28113fc1556
Date: Wed, 11 Nov 2015 20:44:58 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU AUCTeX".

The branch, master has been updated
       via  cc72777fd26f2bd75904d1280d08c28113fc1556 (commit)
      from  5179308ed7eae182e1ff6cfe5bbc596097fba31b (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit cc72777fd26f2bd75904d1280d08c28113fc1556
Author: Mosè Giordano <address@hidden>
Date:   Wed Nov 11 21:44:11 2015 +0100

    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.

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}

-----------------------------------------------------------------------

Summary of changes:
 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(-)
 create mode 100644 tests/latex/math-indent-in.tex
 create mode 100644 tests/latex/math-indent-out.tex


hooks/post-receive
-- 
GNU AUCTeX



reply via email to

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