summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/parsecpp2/expectedoutput.txt3
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/parsecpp2/main.cpp13
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/parsecpp2/project.ts.result12
3 files changed, 28 insertions, 0 deletions
diff --git a/tests/auto/linguist/lupdate/testdata/good/parsecpp2/expectedoutput.txt b/tests/auto/linguist/lupdate/testdata/good/parsecpp2/expectedoutput.txt
index 195c0e6..d4ebe49 100644
--- a/tests/auto/linguist/lupdate/testdata/good/parsecpp2/expectedoutput.txt
+++ b/tests/auto/linguist/lupdate/testdata/good/parsecpp2/expectedoutput.txt
@@ -2,3 +2,6 @@
.*/lupdate/testdata/good/parsecpp2/main.cpp:55: Excess closing brace .*
.*/lupdate/testdata/good/parsecpp2/main.cpp:61: Excess closing brace .*
.*/lupdate/testdata/good/parsecpp2/main.cpp:65: Excess closing brace .*
+.*/lupdate/testdata/good/parsecpp2/main.cpp:120: //% cannot be used with tr\(\) / QT_TR_NOOP\(\)\. Ignoring
+.*/lupdate/testdata/good/parsecpp2/main.cpp:123: //% cannot be used with translate\(\) / QT_TRANSLATE_NOOP\(\)\. Ignoring
+.*/lupdate/testdata/good/parsecpp2/main.cpp:126: Discarding unconsumed meta data
diff --git a/tests/auto/linguist/lupdate/testdata/good/parsecpp2/main.cpp b/tests/auto/linguist/lupdate/testdata/good/parsecpp2/main.cpp
index feb885c..06e6fe0 100644
--- a/tests/auto/linguist/lupdate/testdata/good/parsecpp2/main.cpp
+++ b/tests/auto/linguist/lupdate/testdata/good/parsecpp2/main.cpp
@@ -112,3 +112,16 @@ void ToBeUsed::caller()
{
tr("NameSpace::ToBeUsed");
}
+
+
+
+// QTBUG-11818
+//% "Foo"
+QObject::tr("Hello World");
+QObject::tr("Hello World");
+//% "Bar"
+QApplication::translate("QObject", "Hello World");
+QApplication::translate("QObject", "Hello World");
+//% "Baz"
+clear = me;
+QObject::tr("Hello World");
diff --git a/tests/auto/linguist/lupdate/testdata/good/parsecpp2/project.ts.result b/tests/auto/linguist/lupdate/testdata/good/parsecpp2/project.ts.result
index 6f48e27..806f56f 100644
--- a/tests/auto/linguist/lupdate/testdata/good/parsecpp2/project.ts.result
+++ b/tests/auto/linguist/lupdate/testdata/good/parsecpp2/project.ts.result
@@ -10,6 +10,18 @@
</message>
</context>
<context>
+ <name>QObject</name>
+ <message>
+ <location filename="main.cpp" line="120"/>
+ <location filename="main.cpp" line="121"/>
+ <location filename="main.cpp" line="123"/>
+ <location filename="main.cpp" line="124"/>
+ <location filename="main.cpp" line="127"/>
+ <source>Hello World</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
<name>TopLevel</name>
<message>
<location filename="main.cpp" line="82"/>