[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/auctex fbc6399b99 09/13: Add new tests
From: |
Tassilo Horn |
Subject: |
[elpa] externals/auctex fbc6399b99 09/13: Add new tests |
Date: |
Sun, 5 Mar 2023 03:25:40 -0500 (EST) |
branch: externals/auctex
commit fbc6399b9949888eb48bd8b61406ab06d98c9d25
Author: Ikumi Keita <ikumi@ikumi.que.jp>
Commit: Ikumi Keita <ikumi@ikumi.que.jp>
Add new tests
* tests/latex/nested-indent-in.tex:
* tests/latex/nested-indent-out.tex:
New files for additional test for bug#48518.
* tests/latex/latex-test.el (AUCTeX-set-ert-path): Add new entries for
the above new files.
(LaTeX-indent-nested-envs): New test for bug#48518.
* tests/latex/latex-filling-in.tex:
* tests/latex/latex-filling-out.tex:
Add \usepackage and paragraphs for bug#61400
---
tests/latex/latex-filling-in.tex | 14 ++++++++++++++
tests/latex/latex-filling-out.tex | 19 +++++++++++++++++++
tests/latex/latex-test.el | 21 +++++++++++++++++++++
tests/latex/nested-indent-in.tex | 10 ++++++++++
tests/latex/nested-indent-out.tex | 12 ++++++++++++
5 files changed, 76 insertions(+)
diff --git a/tests/latex/latex-filling-in.tex b/tests/latex/latex-filling-in.tex
index 16c314f95b..11a4d9afb1 100644
--- a/tests/latex/latex-filling-in.tex
+++ b/tests/latex/latex-filling-in.tex
@@ -1,4 +1,6 @@
\documentclass{article}
+\usepackage{url}
+\usepackage{fvextra}
\usepackage{shortvrb}
\begin{document}
@@ -81,6 +83,18 @@ Lorem ipsum dolor sit amet, consectetur adipiscing elit,
\verb|sed do|eiusmod te
% '(?\") in the function `LaTeX-filling' in latex-test.el.
Lorem ipsum dolor sit amet, consectetur adipiscing elit, "sed do"eiusmod tempor
+% bug#61400 Various verb-like commands shold allow line break at just
+% before them.
+Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec \path{bar}
+% bug#61400
+Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec \path|bar|
+% bug#61400
+Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec \Verb{bar}
+% bug#61400
+Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec \Verb|bar|
+% bug#61400
+Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec \verb|bar|
+
\end{document}
%%% Local Variables:
diff --git a/tests/latex/latex-filling-out.tex
b/tests/latex/latex-filling-out.tex
index 18dec27ccc..0e29070ecb 100644
--- a/tests/latex/latex-filling-out.tex
+++ b/tests/latex/latex-filling-out.tex
@@ -1,4 +1,6 @@
\documentclass{article}
+\usepackage{url}
+\usepackage{fvextra}
\usepackage{shortvrb}
\begin{document}
@@ -91,6 +93,23 @@ Lorem ipsum dolor sit amet, consectetur adipiscing elit,
Lorem ipsum dolor sit amet, consectetur adipiscing elit,
"sed do"eiusmod tempor
+% bug#61400 Various verb-like commands shold allow line break at just
+% before them.
+Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec
+\path{bar}
+% bug#61400
+Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec
+\path|bar|
+% bug#61400
+Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec
+\Verb{bar}
+% bug#61400
+Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec
+\Verb|bar|
+% bug#61400
+Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec
+\verb|bar|
+
\end{document}
%%% Local Variables:
diff --git a/tests/latex/latex-test.el b/tests/latex/latex-test.el
index c82b240fcd..fbd64e0953 100644
--- a/tests/latex/latex-test.el
+++ b/tests/latex/latex-test.el
@@ -55,6 +55,10 @@
"conditionals-indent-in.tex"
'LaTeX-conditionals-indent/out
"conditionals-indent-out.tex"
+ 'LaTeX-nested-indent/in
+ "nested-indent-in.tex"
+ 'LaTeX-nested-indent/out
+ "nested-indent-out.tex"
'docTeX/in
"doctex-indent-in.dtx"
'docTeX/out
@@ -143,6 +147,23 @@
(newline-and-indent)
(should (= (current-column) 2)))))
+;; bug#48518 Test indent in nested environments
+(ert-deftest LaTeX-indent-nested-envs ()
+ (should (string=
+ (with-temp-buffer
+ (insert-file-contents LaTeX-nested-indent/in)
+ (LaTeX-mode)
+ (let ((TeX-parse-self t))
+ (TeX-update-style t))
+ (search-forward "a^2 + b^2 = c^2")
+ (set-mark (match-beginning 0))
+ (activate-mark)
+ (LaTeX-insert-environment "equation")
+ (buffer-string))
+ (with-temp-buffer
+ (insert-file-contents LaTeX-nested-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
diff --git a/tests/latex/nested-indent-in.tex b/tests/latex/nested-indent-in.tex
new file mode 100644
index 0000000000..eb8510784f
--- /dev/null
+++ b/tests/latex/nested-indent-in.tex
@@ -0,0 +1,10 @@
+\documentclass{article}
+
+\begin{document}
+\begin{itemize}
+\item hello test.
+ some more text.
+ a^2 + b^2 = c^2
+ and some text afterwards here.
+\end{itemize}
+\end{document}
diff --git a/tests/latex/nested-indent-out.tex
b/tests/latex/nested-indent-out.tex
new file mode 100644
index 0000000000..e321ccfb53
--- /dev/null
+++ b/tests/latex/nested-indent-out.tex
@@ -0,0 +1,12 @@
+\documentclass{article}
+
+\begin{document}
+\begin{itemize}
+\item hello test.
+ some more text.
+ \begin{equation}
+ a^2 + b^2 = c^2
+ \end{equation}
+ and some text afterwards here.
+\end{itemize}
+\end{document}
- [elpa] externals/auctex updated (6d4b412b69 -> 658832b8a2), Tassilo Horn, 2023/03/05
- [elpa] externals/auctex 41397e93cb 04/13: ; Improve last change, Tassilo Horn, 2023/03/05
- [elpa] externals/auctex 5cf1dd2ae2 01/13: Indent the active region (bug#48518, bug#28382), Tassilo Horn, 2023/03/05
- [elpa] externals/auctex 3564d9467e 10/13: ; Fix typos, Tassilo Horn, 2023/03/05
- [elpa] externals/auctex 992410a201 02/13: ; * style/physics.el: Fix trivial typo., Tassilo Horn, 2023/03/05
- [elpa] externals/auctex 9d8bd6b30e 06/13: Update style/ltugboat.el to class version 2.28, Tassilo Horn, 2023/03/05
- [elpa] externals/auctex fbc6399b99 09/13: Add new tests,
Tassilo Horn <=
- [elpa] externals/auctex b77907698e 12/13: Merge remote-tracking branch 'origin/master' into externals/auctex, Tassilo Horn, 2023/03/05
- [elpa] externals/auctex bbb4e2ae23 08/13: Fill \verb-like macros appropriately (bug#61400), Tassilo Horn, 2023/03/05
- [elpa] externals/auctex 658832b8a2 13/13: Release GNU AUCTeX 13.1.10, Tassilo Horn, 2023/03/05
- [elpa] externals/auctex 358cc74dda 03/13: Add new style/algpseudocodex.el, Tassilo Horn, 2023/03/05
- [elpa] externals/auctex de6aa05d74 05/13: Make `texmathp' aware of verbatim macros/environments, Tassilo Horn, 2023/03/05
- [elpa] externals/auctex 4c77908707 11/13: Fix \includegraphics key-vals prompt in beamer documents., Tassilo Horn, 2023/03/05
- [elpa] externals/auctex 4959b9d240 07/13: * style/url.el ("url"): Add missing \DeclareUrlCommand macro., Tassilo Horn, 2023/03/05