lyx_mirror/src/tests/check_ExternalTransforms.cpp
Georg Baum 1db9224cff Add unit test for sanitizeLatexOption()
This is a prerequisite for safe removal of regex::match_partial.
2014-12-28 13:23:35 +01:00

38 lines
975 B
C++

#include <config.h>
#include "../insets/ExternalTransforms.h"
#include "../support/debug.h"
#include <iostream>
using namespace lyx;
using namespace std;
void test_sanitizeLatexOption()
{
using external::sanitizeLatexOption;
cout << sanitizeLatexOption("[]") << endl;
cout << sanitizeLatexOption("[,]") << endl;
cout << sanitizeLatexOption("[,,]") << endl;
cout << sanitizeLatexOption("[,,,]") << endl;
cout << sanitizeLatexOption("[a]") << endl;
cout << sanitizeLatexOption("[,a]") << endl;
cout << sanitizeLatexOption("[,,a]") << endl;
cout << sanitizeLatexOption("[,,,a]") << endl;
cout << sanitizeLatexOption("[a,b]") << endl;
cout << sanitizeLatexOption("[a,,b]") << endl;
cout << sanitizeLatexOption("[a,,,b]") << endl;
cout << sanitizeLatexOption("[a,]") << endl;
cout << sanitizeLatexOption("[a,,]") << endl;
cout << sanitizeLatexOption("[a,,,]") << endl;
}
int main(int, char **)
{
lyx::lyxerr.setStream(cerr);
test_sanitizeLatexOption();
}