aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorNeil <nyamatongwe@gmail.com>2020-06-09 20:42:51 +1000
committerNeil <nyamatongwe@gmail.com>2020-06-09 20:42:51 +1000
commit4b01695fc57d24e455a4b2f7a17d4db19c449fec (patch)
tree194c0f7b0870bebefff9fa528b552ebfefb669a1
parent534e0288e56e52abe91132038e9960fba35a2fde (diff)
downloadscintilla-mirror-4b01695fc57d24e455a4b2f7a17d4db19c449fec.tar.gz
Add test for latex lexer.
-rw-r--r--lexilla/test/examples/latex/AllStyles.tex47
-rw-r--r--lexilla/test/examples/latex/AllStyles.tex.styled47
-rw-r--r--lexilla/test/examples/latex/SciTE.properties1
3 files changed, 95 insertions, 0 deletions
diff --git a/lexilla/test/examples/latex/AllStyles.tex b/lexilla/test/examples/latex/AllStyles.tex
new file mode 100644
index 000000000..dc7ed9b6e
--- /dev/null
+++ b/lexilla/test/examples/latex/AllStyles.tex
@@ -0,0 +1,47 @@
+% Enumerate all styles: 0 to 12
+% Not a valid laTeX file as entities are unbalanced and not semantically correct
+% comment=4
+
+% whitespace=0
+text %
+
+% command=1
+\documentclass
+
+% tag=2
+\begin{document}
+
+% tag closing=5
+\end{document}
+
+% math=3
+\begin{math}
+E &= mc^2
+\end{math}
+
+% math block=6
+\begin{align}
+E &= mc^2
+\end{align}
+
+% comment block=7
+\begin{comment}
+A block comment
+\end{comment}
+
+% verbatim=8
+\begin{verbatim}
+puts $foo
+\end{verbatim}
+
+% short command=9
+\(\)
+
+% special=10
+\#
+
+% command optional argument=11
+\x[12pt]
+
+% error=12
+\
diff --git a/lexilla/test/examples/latex/AllStyles.tex.styled b/lexilla/test/examples/latex/AllStyles.tex.styled
new file mode 100644
index 000000000..bed7ff5df
--- /dev/null
+++ b/lexilla/test/examples/latex/AllStyles.tex.styled
@@ -0,0 +1,47 @@
+{4}% Enumerate all styles: 0 to 12{0}
+{4}% Not a valid laTeX file as entities are unbalanced and not semantically correct{0}
+{4}% comment=4{0}
+
+{4}% whitespace=0{0}
+text {4}%{0}
+
+{4}% command=1{0}
+{1}\documentclass{0}
+
+{4}% tag=2{0}
+{1}\begin{2}{document}{0}
+
+{4}% tag closing=5{0}
+{1}\end{5}{document}{0}
+
+{4}% math=3{0}
+{1}\begin{2}{math}{3}
+E &= mc^2
+{1}\end{5}{math}{0}
+
+{4}% math block=6{0}
+{1}\begin{2}{align}{6}
+E &= mc^2
+{1}\end{5}{align}{0}
+
+{4}% comment block=7{0}
+{1}\begin{2}{comment}{7}
+A block comment
+{1}\end{5}{comment}{0}
+
+{4}% verbatim=8{0}
+{1}\begin{2}{verbatim}{8}
+puts $foo
+{1}\end{5}{verbatim}{0}
+
+{4}% short command=9{0}
+{9}\(\){0}
+
+{4}% special=10{0}
+{10}\#{0}
+
+{4}% command optional argument=11{0}
+{1}\x{11}[12pt]{0}
+
+{4}% error=12{0}
+{12}\{0}
diff --git a/lexilla/test/examples/latex/SciTE.properties b/lexilla/test/examples/latex/SciTE.properties
new file mode 100644
index 000000000..0b81c1199
--- /dev/null
+++ b/lexilla/test/examples/latex/SciTE.properties
@@ -0,0 +1 @@
+lexer.*.tex=latex