]> git.lyx.org Git - features.git/blob - src/tests/check_ExternalTransforms.cpp
Add unit test for sanitizeLatexOption()
[features.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         cout << sanitizeLatexOption("[]") << endl;
17         cout << sanitizeLatexOption("[,]") << endl;
18         cout << sanitizeLatexOption("[,,]") << endl;
19         cout << sanitizeLatexOption("[,,,]") << endl;
20         cout << sanitizeLatexOption("[a]") << endl;
21         cout << sanitizeLatexOption("[,a]") << endl;
22         cout << sanitizeLatexOption("[,,a]") << endl;
23         cout << sanitizeLatexOption("[,,,a]") << endl;
24         cout << sanitizeLatexOption("[a,b]") << endl;
25         cout << sanitizeLatexOption("[a,,b]") << endl;
26         cout << sanitizeLatexOption("[a,,,b]") << endl;
27         cout << sanitizeLatexOption("[a,]") << endl;
28         cout << sanitizeLatexOption("[a,,]") << endl;
29         cout << sanitizeLatexOption("[a,,,]") << endl;
30 }
31
32
33 int main(int, char **)
34 {
35         lyx::lyxerr.setStream(cerr);
36         test_sanitizeLatexOption();
37 }