From 7e91986c352677d4c0456d30e1cb5fc3179e28c3 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Tue, 30 Jun 2009 18:02:00 +0200 Subject: add 4.6 specific modifications to linguist tools tests --- .../testdata/good/lacksqobject/expectedoutput.txt | 8 +++-- .../testdata/good/parsecpp2/expectedoutput.txt | 7 ++++ .../lupdate/testdata/good/parsecpp2/main.cpp | 24 +++++++++++++ .../lupdate/testdata/good/parsecpp2/main2.cpp | 28 +++++++++++++++ .../lupdate/testdata/good/parsecpp2/main3.cpp | 42 ++++++++++++++++++++++ .../lupdate/testdata/good/parsecpp2/project.pro | 12 +++++++ .../testdata/good/parsecpp2/project.ts.result | 4 +++ 7 files changed, 123 insertions(+), 2 deletions(-) create mode 100644 tests/auto/linguist/lupdate/testdata/good/parsecpp2/expectedoutput.txt create mode 100644 tests/auto/linguist/lupdate/testdata/good/parsecpp2/main.cpp create mode 100644 tests/auto/linguist/lupdate/testdata/good/parsecpp2/main2.cpp create mode 100644 tests/auto/linguist/lupdate/testdata/good/parsecpp2/main3.cpp create mode 100644 tests/auto/linguist/lupdate/testdata/good/parsecpp2/project.pro create mode 100644 tests/auto/linguist/lupdate/testdata/good/parsecpp2/project.ts.result diff --git a/tests/auto/linguist/lupdate/testdata/good/lacksqobject/expectedoutput.txt b/tests/auto/linguist/lupdate/testdata/good/lacksqobject/expectedoutput.txt index 8a0bd11..1a6cfeb 100644 --- a/tests/auto/linguist/lupdate/testdata/good/lacksqobject/expectedoutput.txt +++ b/tests/auto/linguist/lupdate/testdata/good/lacksqobject/expectedoutput.txt @@ -1,4 +1,8 @@ .*/lupdate/testdata/good/lacksqobject/main.cpp:17: Class 'B' lacks Q_OBJECT macro -.*/lupdate/testdata/good/lacksqobject/main.cpp:26: Class 'C' lacks Q_OBJECT macro + +.*/lupdate/testdata/good/lacksqobject/main.cpp:24: Class 'C' lacks Q_OBJECT macro + .*/lupdate/testdata/good/lacksqobject/main.cpp:37: Class 'nsB::B' lacks Q_OBJECT macro -.*/lupdate/testdata/good/lacksqobject/main.cpp:45: Class 'nsB::C' lacks Q_OBJECT macro + +.*/lupdate/testdata/good/lacksqobject/main.cpp:43: Class 'nsB::C' lacks Q_OBJECT macro + diff --git a/tests/auto/linguist/lupdate/testdata/good/parsecpp2/expectedoutput.txt b/tests/auto/linguist/lupdate/testdata/good/parsecpp2/expectedoutput.txt new file mode 100644 index 0000000..e3f7926 --- /dev/null +++ b/tests/auto/linguist/lupdate/testdata/good/parsecpp2/expectedoutput.txt @@ -0,0 +1,7 @@ +.*/lupdate/testdata/good/parsecpp2/main.cpp:10: Excess closing brace .* + +.*/lupdate/testdata/good/parsecpp2/main.cpp:14: Excess closing brace .* + +.*/lupdate/testdata/good/parsecpp2/main.cpp:20: Excess closing brace .* + +.*/lupdate/testdata/good/parsecpp2/main.cpp:24: Excess closing brace .* diff --git a/tests/auto/linguist/lupdate/testdata/good/parsecpp2/main.cpp b/tests/auto/linguist/lupdate/testdata/good/parsecpp2/main.cpp new file mode 100644 index 0000000..eb4a09b --- /dev/null +++ b/tests/auto/linguist/lupdate/testdata/good/parsecpp2/main.cpp @@ -0,0 +1,24 @@ +// IMPORTANT!!!! If you want to add testdata to this file, +// always add it to the end in order to not change the linenumbers of translations!!! + +// nothing here + +// sickness: multi-\ +line c++ comment } (with brace) + +#define This is a closing brace } which was ignored +} // complain here + +#define This is another \ + closing brace } which was ignored +} // complain here + +#define This is another /* comment in } define */\ + something /* comment ) + spanning {multiple} lines */ \ + closing brace } which was ignored +} // complain here + +#define This is another // comment in } define \ + something } comment +} // complain here diff --git a/tests/auto/linguist/lupdate/testdata/good/parsecpp2/main2.cpp b/tests/auto/linguist/lupdate/testdata/good/parsecpp2/main2.cpp new file mode 100644 index 0000000..1c72ac2 --- /dev/null +++ b/tests/auto/linguist/lupdate/testdata/good/parsecpp2/main2.cpp @@ -0,0 +1,28 @@ +// IMPORTANT!!!! If you want to add testdata to this file, +// always add it to the end in order to not change the linenumbers of translations!!! + +// nothing here + +// sickness: multi-\ +line c++ comment } (with brace) + +#define This is a closing brace } which was ignored +} // complain here + +#define This is another \ + closing brace } which was ignored +} // complain here + +#define This is another /* comment in } define */\ + something /* comment ) + spanning {multiple} lines */ \ + closing brace } which was ignored +} // complain here + +#define This is another // comment in } define \ + something } comment +} // complain here + +char somestring[] = "\ + continued\n\ + here and \"quoted\" to activate\n"; diff --git a/tests/auto/linguist/lupdate/testdata/good/parsecpp2/main3.cpp b/tests/auto/linguist/lupdate/testdata/good/parsecpp2/main3.cpp new file mode 100644 index 0000000..731d5cdf --- /dev/null +++ b/tests/auto/linguist/lupdate/testdata/good/parsecpp2/main3.cpp @@ -0,0 +1,42 @@ +// IMPORTANT!!!! If you want to add testdata to this file, +// always add it to the end in order to not change the linenumbers of translations!!! + +// nothing here + +// sickness: multi-\ +line c++ comment } (with brace) + +#define This is a closing brace } which was ignored +} // complain here + +#define This is another \ + closing brace } which was ignored +} // complain here + +#define This is another /* comment in } define */\ + something /* comment ) + spanning {multiple} lines */ \ + closing brace } which was ignored +} // complain here + +#define This is another // comment in } define \ + something } comment +} // complain here + +char somestring[] = "\ + continued\n\ + here and \"quoted\" to activate\n"; + + NSString *scriptSource = @"\ + on SetupNewMail(theRecipientAddress, theSubject, theContent, theAttachmentPath)\n\ + tell application \"Mail\" to activate\n\ + tell application \"Mail\"\n\ + set theMessage to make new outgoing message with properties {visible:true, subject:theSubject, content:theContent}\n\ + tell theMessage\n\ + make new to recipient at end of to recipients with properties {address:theRecipientAddress}\n\ + end tell\n\ + tell content of theMessage\n\ + make new attachment with properties {file name:theAttachmentPath} at after last paragraph\n\ + end tell\n\ + end tell\n\ + end SetupNewMail\n"; diff --git a/tests/auto/linguist/lupdate/testdata/good/parsecpp2/project.pro b/tests/auto/linguist/lupdate/testdata/good/parsecpp2/project.pro new file mode 100644 index 0000000..7547a8d --- /dev/null +++ b/tests/auto/linguist/lupdate/testdata/good/parsecpp2/project.pro @@ -0,0 +1,12 @@ +TEMPLATE = app +LANGUAGE = C++ + +SOURCES = main.cpp + +TRANSLATIONS += project.ts + +exists( $$TRANSLATIONS ) { + win32: system(del $$TRANSLATIONS) + unix: system(rm $$TRANSLATIONS) +} + diff --git a/tests/auto/linguist/lupdate/testdata/good/parsecpp2/project.ts.result b/tests/auto/linguist/lupdate/testdata/good/parsecpp2/project.ts.result new file mode 100644 index 0000000..07a7469 --- /dev/null +++ b/tests/auto/linguist/lupdate/testdata/good/parsecpp2/project.ts.result @@ -0,0 +1,4 @@ + + + + -- cgit v0.12