[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master fbc6399b: Add new tests
From: |
Ikumi Keita |
Subject: |
master fbc6399b: Add new tests |
Date: |
Tue, 21 Feb 2023 07:20:18 -0500 (EST) |
branch: master
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 16c314f9..11a4d9af 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 18dec27c..0e29070e 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 c82b240f..fbd64e09 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 00000000..eb851078
--- /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 00000000..e321ccfb
--- /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}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master fbc6399b: Add new tests,
Ikumi Keita <=