mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 13:18:28 +00:00
Test invalid sanitizeLatexOption() input as well
This commit is contained in:
parent
62ed0aeefb
commit
449c766e03
@ -13,7 +13,17 @@ using namespace std;
|
||||
void test_sanitizeLatexOption()
|
||||
{
|
||||
using external::sanitizeLatexOption;
|
||||
// invalid input
|
||||
cout << sanitizeLatexOption("") << endl;
|
||||
cout << sanitizeLatexOption(",") << endl;
|
||||
cout << sanitizeLatexOption(",,") << endl;
|
||||
cout << sanitizeLatexOption("[") << endl;
|
||||
cout << sanitizeLatexOption("]") << endl;
|
||||
// valid input
|
||||
cout << sanitizeLatexOption("[]") << endl;
|
||||
cout << sanitizeLatexOption("[[]") << endl;
|
||||
cout << sanitizeLatexOption("[]]") << endl;
|
||||
cout << sanitizeLatexOption("[[]]") << endl;
|
||||
cout << sanitizeLatexOption("[,]") << endl;
|
||||
cout << sanitizeLatexOption("[,,]") << endl;
|
||||
cout << sanitizeLatexOption("[,,,]") << endl;
|
||||
@ -32,6 +42,7 @@ void test_sanitizeLatexOption()
|
||||
|
||||
int main(int, char **)
|
||||
{
|
||||
lyx::lyxerr.setStream(cerr);
|
||||
// Connect lyxerr with cout instead of cerr to catch error output
|
||||
lyx::lyxerr.setStream(cout);
|
||||
test_sanitizeLatexOption();
|
||||
}
|
||||
|
@ -1,4 +1,17 @@
|
||||
Unable to sanitize LaTeX "Option":
|
||||
|
||||
Unable to sanitize LaTeX "Option": ,
|
||||
|
||||
Unable to sanitize LaTeX "Option": ,,
|
||||
|
||||
Unable to sanitize LaTeX "Option":
|
||||
|
||||
Unable to sanitize LaTeX "Option": ]
|
||||
|
||||
|
||||
[[]
|
||||
[]]
|
||||
[[]]
|
||||
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user