2 var mode = CodeMirror.getMode({tabSize: 4}, "stex");
3 function MT(name) { test.mode(name, mode, Array.prototype.slice.call(arguments, 1)); }
11 MT("beginEndDocument",
12 "[tag \\begin][bracket {][atom document][bracket }]",
13 "[tag \\end][bracket {][atom document][bracket }]");
15 MT("beginEndEquation",
16 "[tag \\begin][bracket {][atom equation][bracket }]",
18 "[tag \\end][bracket {][atom equation][bracket }]");
21 "[tag \\begin][bracket {][atom module][bracket }[[]]]");
24 "[tag \\begin][bracket {][atom module][bracket }[[]id=bbt-size[bracket ]]]");
27 "[tag \\importmodule][bracket [[][string b-b-t][bracket ]]{][builtin b-b-t][bracket }]");
29 MT("importModulePath",
30 "[tag \\importmodule][bracket [[][tag \\KWARCslides][bracket {][string dmath/en/cardinality][bracket }]]{][builtin card][bracket }]");
33 "[tag \\PSforPDF][bracket [[][atom 1][bracket ]]{]#1[bracket }]");
39 "[tag \\item][comment % bar]");
42 " [comment % \\item]");
44 MT("commentLineBreak",
49 "[tag \\begin][error }][bracket {]");
52 "[tag \\item][error ]]][bracket {]");
61 "a [tag \\$][atom 5] stetson");
64 "[atom 100][tag \\%] beef");
73 "[tag \\emph][bracket {][tag \\{][bracket }]");
76 "[tag \\emph][bracket {][tag \\}][bracket }]");
79 "section [tag \\S][atom 1]");
82 "para [tag \\P][atom 2]");
90 MT("negativeThinspace",
93 MT("periodNotSentence",
99 MT("italicCorrection",
100 "[bracket {][tag \\em] If[tag \\/][bracket }] I");
103 "[tag \\newcommand][bracket {][tag \\pop][bracket }]");
105 MT("inlineMathTagFollowedByNumber",
106 "[keyword $][tag \\pi][number 2][keyword $]");
109 "[keyword $][number 3][variable-2 x][tag ^][number 2.45]-[tag \\sqrt][bracket {][tag \\$\\alpha][bracket }] = [number 2][keyword $] other text");
112 "More [keyword $$]\t[variable-2 S][tag ^][variable-2 n][tag \\sum] [variable-2 i][keyword $$] other text");
114 MT("mathWithComment",
115 "[keyword $][variable-2 x] [comment % $]",
116 "[variable-2 y][keyword $] other text");
118 MT("lineBreakArgument",
119 "[tag \\\\][bracket [[][atom 1cm][bracket ]]]");