summaryrefslogtreecommitdiffstats
path: root/tests/auto/linguist/lupdate/testdata
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@nokia.com>2009-06-30 18:02:00 +0200
committerOswald Buddenhagen <oswald.buddenhagen@nokia.com>2009-06-30 18:02:00 +0200
commit7e91986c352677d4c0456d30e1cb5fc3179e28c3 (patch)
tree7bbba8ba409b02f19a239936eb224fd39892b952 /tests/auto/linguist/lupdate/testdata
parentaa59008b92d4d1eb5b45352cac3408cc39086dba (diff)
add 4.6 specific modifications to linguist tools tests
Diffstat (limited to 'tests/auto/linguist/lupdate/testdata')
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/lacksqobject/expectedoutput.txt8
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/parsecpp2/expectedoutput.txt7
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/parsecpp2/main.cpp24
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/parsecpp2/main2.cpp28
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/parsecpp2/main3.cpp42
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/parsecpp2/project.pro12
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/parsecpp2/project.ts.result4
7 files changed, 123 insertions, 2 deletions
diff --git a/tests/auto/linguist/lupdate/testdata/good/lacksqobject/expectedoutput.txt b/tests/auto/linguist/lupdate/testdata/good/lacksqobject/expectedoutput.txt
index 8a0bd11495..1a6cfebe63 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 0000000000..e3f79260fe
--- /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 0000000000..eb4a09b8dc
--- /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 0000000000..1c72ac271c
--- /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 0000000000..731d5cdf01
--- /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 0000000000..7547a8d0e5
--- /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 0000000000..07a7469f10
--- /dev/null
+++ b/tests/auto/linguist/lupdate/testdata/good/parsecpp2/project.ts.result
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE TS>
+<TS version="2.0">
+</TS>