3 #include "../insets/ExternalTransforms.h"
4 #include "../support/debug.h"
13 void test_sanitizeLatexOption()
15 using external::sanitizeLatexOption;
17 cout << sanitizeLatexOption("") << endl;
18 cout << sanitizeLatexOption(",") << endl;
19 cout << sanitizeLatexOption(",,") << endl;
20 cout << sanitizeLatexOption("[") << endl;
21 cout << sanitizeLatexOption("]") << endl;
22 cout << sanitizeLatexOption("a,[,c]") << endl;
23 cout << sanitizeLatexOption("[a,],c") << endl;
25 cout << sanitizeLatexOption("[]") << endl;
26 cout << sanitizeLatexOption("[[]") << endl;
27 cout << sanitizeLatexOption("[]]") << endl;
28 cout << sanitizeLatexOption("[[]]") << endl;
29 cout << sanitizeLatexOption("[,]") << endl;
30 cout << sanitizeLatexOption("[,,]") << endl;
31 cout << sanitizeLatexOption("[,,,]") << endl;
32 cout << sanitizeLatexOption("[a]") << endl;
33 cout << sanitizeLatexOption("[,a]") << endl;
34 cout << sanitizeLatexOption("[,,a]") << endl;
35 cout << sanitizeLatexOption("[,,,a]") << endl;
36 cout << sanitizeLatexOption("[a,b]") << endl;
37 cout << sanitizeLatexOption("[a,,b]") << endl;
38 cout << sanitizeLatexOption("[a,,,b]") << endl;
39 cout << sanitizeLatexOption("[a,[,c]") << endl;
40 cout << sanitizeLatexOption("[a,],c]") << endl;
41 cout << sanitizeLatexOption("[a,[],c]") << endl;
42 cout << sanitizeLatexOption("[a,,[],,c]") << endl;
43 cout << sanitizeLatexOption("[a,,[,],,c]") << endl;
44 cout << sanitizeLatexOption("[a,]") << endl;
45 cout << sanitizeLatexOption("[a,,]") << endl;
46 cout << sanitizeLatexOption("[a,,,]") << endl;
50 int main(int, char **)
52 // Connect lyxerr with cout instead of cerr to catch error output
53 lyx::lyxerr.setStream(cout);
54 test_sanitizeLatexOption();