]> git.lyx.org Git - lyx.git/blob - src/tests/check_ExternalTransforms.cpp
Add Qt's Svg module to the list of used modules. This is required to allow the use...
[lyx.git] / src / tests / check_ExternalTransforms.cpp
1 #include <config.h>
2
3 #include "../insets/ExternalTransforms.h"
4 #include "../support/debug.h"
5
6 #include <iostream>
7
8
9 using namespace lyx;
10 using namespace std;
11
12
13 void test_sanitizeLatexOption()
14 {
15         using external::sanitizeLatexOption;
16         // invalid input
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;
24         // valid input
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;
47 }
48
49
50 int main(int, char **)
51 {
52         // Connect lyxerr with cout instead of cerr to catch error output
53         lyx::lyxerr.setStream(cout);
54         test_sanitizeLatexOption();
55 }