Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(327)

Unified Diff: lib/src/prism/tests/languages/latex/equation_feature.test

Issue 1418513006: update elements and fix some bugs (Closed) Base URL: git@github.com:dart-lang/polymer_elements.git@master
Patch Set: code review updates Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: lib/src/prism/tests/languages/latex/equation_feature.test
diff --git a/lib/src/prism/tests/languages/latex/equation_feature.test b/lib/src/prism/tests/languages/latex/equation_feature.test
new file mode 100644
index 0000000000000000000000000000000000000000..40caeebe89da3674d8b3083a0271eb0bfdf28caf
--- /dev/null
+++ b/lib/src/prism/tests/languages/latex/equation_feature.test
@@ -0,0 +1,121 @@
+$foo$
+$a \dots
+b$
+\(foo\)
+\(a \dots
+b\)
+\[foo\]
+\[a \dots
+b\]
+
+\begin{equation}foo\end{equation}
+\begin{equation}a \dots
+b\end{equation}
+\begin{math}foo\end{math}
+\begin{math}a \dots
+b\end{math}
+\begin{eqnarray}foo\end{eqnarray}
+\begin{eqnarray}a \dots
+b\end{eqnarray}
+\begin{align}foo\end{align}
+\begin{align*}a \dots
+b\end{align*}
+\begin{multline}foo\end{multline}
+\begin{multline}a \dots
+b\end{multline}
+\begin{gather}foo\end{gather}
+\begin{gather}a \dots
+b\end{gather}
+
+----------------------------------------------------
+
+[
+ ["equation", ["$foo$"]],
+ ["equation", [
+ "$a ",
+ ["equation-command", "\\dots"],
+ "\r\nb$"
+ ]],
+ ["equation", ["\\(foo\\)"]],
+ ["equation", [
+ "\\(a ",
+ ["equation-command", "\\dots"],
+ "\r\nb\\)"
+ ]],
+ ["equation", ["\\[foo\\]"]],
+ ["equation", [
+ "\\[a ",
+ ["equation-command", "\\dots"],
+ "\r\nb\\]"
+ ]],
+
+ ["function", "\\begin"], ["punctuation", "{"],
+ ["keyword", "equation"], ["punctuation", "}"],
+ ["equation", ["foo"]],
+ ["function", "\\end"], ["punctuation", "{"],
+ ["keyword", "equation"], ["punctuation", "}"],
+ ["function", "\\begin"], ["punctuation", "{"],
+ ["keyword", "equation"], ["punctuation", "}"],
+ ["equation", ["a ", ["equation-command", "\\dots"], "\r\nb"]],
+ ["function", "\\end"], ["punctuation", "{"],
+ ["keyword", "equation"], ["punctuation", "}"],
+
+ ["function", "\\begin"], ["punctuation", "{"],
+ ["keyword", "math"], ["punctuation", "}"],
+ ["equation", ["foo"]],
+ ["function", "\\end"], ["punctuation", "{"],
+ ["keyword", "math"], ["punctuation", "}"],
+ ["function", "\\begin"], ["punctuation", "{"],
+ ["keyword", "math"], ["punctuation", "}"],
+ ["equation", ["a ", ["equation-command", "\\dots"], "\r\nb"]],
+ ["function", "\\end"], ["punctuation", "{"],
+ ["keyword", "math"], ["punctuation", "}"],
+
+ ["function", "\\begin"], ["punctuation", "{"],
+ ["keyword", "eqnarray"], ["punctuation", "}"],
+ ["equation", ["foo"]],
+ ["function", "\\end"], ["punctuation", "{"],
+ ["keyword", "eqnarray"], ["punctuation", "}"],
+ ["function", "\\begin"], ["punctuation", "{"],
+ ["keyword", "eqnarray"], ["punctuation", "}"],
+ ["equation", ["a ", ["equation-command", "\\dots"], "\r\nb"]],
+ ["function", "\\end"], ["punctuation", "{"],
+ ["keyword", "eqnarray"], ["punctuation", "}"],
+
+ ["function", "\\begin"], ["punctuation", "{"],
+ ["keyword", "align"], ["punctuation", "}"],
+ ["equation", ["foo"]],
+ ["function", "\\end"], ["punctuation", "{"],
+ ["keyword", "align"], ["punctuation", "}"],
+ ["function", "\\begin"], ["punctuation", "{"],
+ ["keyword", "align*"], ["punctuation", "}"],
+ ["equation", ["a ", ["equation-command", "\\dots"], "\r\nb"]],
+ ["function", "\\end"], ["punctuation", "{"],
+ ["keyword", "align*"], ["punctuation", "}"],
+
+ ["function", "\\begin"], ["punctuation", "{"],
+ ["keyword", "multline"], ["punctuation", "}"],
+ ["equation", ["foo"]],
+ ["function", "\\end"], ["punctuation", "{"],
+ ["keyword", "multline"], ["punctuation", "}"],
+ ["function", "\\begin"], ["punctuation", "{"],
+ ["keyword", "multline"], ["punctuation", "}"],
+ ["equation", ["a ", ["equation-command", "\\dots"], "\r\nb"]],
+ ["function", "\\end"], ["punctuation", "{"],
+ ["keyword", "multline"], ["punctuation", "}"],
+
+ ["function", "\\begin"], ["punctuation", "{"],
+ ["keyword", "gather"], ["punctuation", "}"],
+ ["equation", ["foo"]],
+ ["function", "\\end"], ["punctuation", "{"],
+ ["keyword", "gather"], ["punctuation", "}"],
+ ["function", "\\begin"], ["punctuation", "{"],
+ ["keyword", "gather"], ["punctuation", "}"],
+ ["equation", ["a ", ["equation-command", "\\dots"], "\r\nb"]],
+ ["function", "\\end"], ["punctuation", "{"],
+ ["keyword", "gather"], ["punctuation", "}"]
+]
+
+----------------------------------------------------
+
+Checks for equations.
« no previous file with comments | « lib/src/prism/tests/languages/latex/comment_feature.test ('k') | lib/src/prism/tests/languages/latex/headline_feature.test » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698