summaryrefslogtreecommitdiffstats
path: root/tests/auto/linguist/lupdate/testdata/good/proparsing2
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@nokia.com>2009-06-30 16:17:56 +0200
committerOswald Buddenhagen <oswald.buddenhagen@nokia.com>2009-06-30 17:18:45 +0200
commitcd796aa6dcdf83fa50ced56a9885835fda851a09 (patch)
tree876cbd2764cabcdff820988a1e205547f8be395b /tests/auto/linguist/lupdate/testdata/good/proparsing2
parent11ee32888b1b2370c70708e1385c26dc3a0a367c (diff)
integrate linguist tool autotests into the qt testsuite
Task-number: 218935
Diffstat (limited to 'tests/auto/linguist/lupdate/testdata/good/proparsing2')
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/proparsing2/a4
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/proparsing2/a.cpp4
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/proparsing2/b4
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/proparsing2/b.cpp4
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/proparsing2/e4
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/proparsing2/f/g.cpp4
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/proparsing2/files-cc.txt1
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/proparsing2/project.pro42
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/proparsing2/project.ts.result62
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/proparsing2/spaces/z4
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/proparsing2/variable_with_spaces4
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/proparsing2/with4
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/proparsing2/x/d4
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/proparsing2/x/variable4
14 files changed, 149 insertions, 0 deletions
diff --git a/tests/auto/linguist/lupdate/testdata/good/proparsing2/a b/tests/auto/linguist/lupdate/testdata/good/proparsing2/a
new file mode 100644
index 0000000000..596639235b
--- /dev/null
+++ b/tests/auto/linguist/lupdate/testdata/good/proparsing2/a
@@ -0,0 +1,4 @@
+QString func()
+{
+ return QLineEdit::tr("a");
+}
diff --git a/tests/auto/linguist/lupdate/testdata/good/proparsing2/a.cpp b/tests/auto/linguist/lupdate/testdata/good/proparsing2/a.cpp
new file mode 100644
index 0000000000..1d80ed36f9
--- /dev/null
+++ b/tests/auto/linguist/lupdate/testdata/good/proparsing2/a.cpp
@@ -0,0 +1,4 @@
+QString func()
+{
+ return QLineEdit::tr("a.cpp");
+}
diff --git a/tests/auto/linguist/lupdate/testdata/good/proparsing2/b b/tests/auto/linguist/lupdate/testdata/good/proparsing2/b
new file mode 100644
index 0000000000..d0fe066aba
--- /dev/null
+++ b/tests/auto/linguist/lupdate/testdata/good/proparsing2/b
@@ -0,0 +1,4 @@
+QString func()
+{
+ return QLineEdit::tr("b");
+}
diff --git a/tests/auto/linguist/lupdate/testdata/good/proparsing2/b.cpp b/tests/auto/linguist/lupdate/testdata/good/proparsing2/b.cpp
new file mode 100644
index 0000000000..a5c386dc45
--- /dev/null
+++ b/tests/auto/linguist/lupdate/testdata/good/proparsing2/b.cpp
@@ -0,0 +1,4 @@
+QString func()
+{
+ return QLineEdit::tr("b.cpp");
+}
diff --git a/tests/auto/linguist/lupdate/testdata/good/proparsing2/e b/tests/auto/linguist/lupdate/testdata/good/proparsing2/e
new file mode 100644
index 0000000000..66e89a89af
--- /dev/null
+++ b/tests/auto/linguist/lupdate/testdata/good/proparsing2/e
@@ -0,0 +1,4 @@
+QString func()
+{
+ return QLineEdit::tr("e");
+}
diff --git a/tests/auto/linguist/lupdate/testdata/good/proparsing2/f/g.cpp b/tests/auto/linguist/lupdate/testdata/good/proparsing2/f/g.cpp
new file mode 100644
index 0000000000..d86bee2866
--- /dev/null
+++ b/tests/auto/linguist/lupdate/testdata/good/proparsing2/f/g.cpp
@@ -0,0 +1,4 @@
+QString func()
+{
+ return QLineEdit::tr("f/g.cpp");
+}
diff --git a/tests/auto/linguist/lupdate/testdata/good/proparsing2/files-cc.txt b/tests/auto/linguist/lupdate/testdata/good/proparsing2/files-cc.txt
new file mode 100644
index 0000000000..5bd8d03dda
--- /dev/null
+++ b/tests/auto/linguist/lupdate/testdata/good/proparsing2/files-cc.txt
@@ -0,0 +1 @@
+a.cpp b.cpp
diff --git a/tests/auto/linguist/lupdate/testdata/good/proparsing2/project.pro b/tests/auto/linguist/lupdate/testdata/good/proparsing2/project.pro
new file mode 100644
index 0000000000..1d6895a892
--- /dev/null
+++ b/tests/auto/linguist/lupdate/testdata/good/proparsing2/project.pro
@@ -0,0 +1,42 @@
+# This is to test if quoted elements with spaces are treated as elements (and not splitted up due
+# to the spaces.)
+# It also tries to verify the behaviour of combining quoted and non-quoted elements with literals.
+#
+
+TEMPLATE = app
+LANGUAGE = C++
+
+QUOTED = $$quote(variable with spaces)
+VERSIONAB = "a.b"
+VAB = $$split(VERSIONAB, ".")
+V += $$VAB
+V += $$QUOTED
+
+# this is just to make p4 happy with no spaces in filename
+SOURCES += $$member(V,0,1)
+V2 = $$member(V,2)
+V2S = $$split(V2, " ")
+SOURCES += $$join(V2S,"_")
+message($$SOURCES)
+# SOURCES += [a, b, variable_with_spaces]
+
+LIST = d e f
+L2 = x/$$LIST/g.cpp
+SOURCES += $$L2
+# SOURCES += [x/d, e, f/g.cpp]
+
+QUOTEDEXTRA = x/$$QUOTED/z
+Q3 = $$split(QUOTEDEXTRA, " ")
+SOURCES += $$Q3
+# SOURCES += [x/variable, with, spaces/z]
+
+win32: SOURCES += $$system(type files-cc.txt)
+unix: SOURCES += $$system(cat files-cc.txt)
+
+TRANSLATIONS += project.ts
+
+exists( $$TRANSLATIONS ) {
+ win32: system(del $$TRANSLATIONS)
+ unix: system(rm $$TRANSLATIONS)
+}
+
diff --git a/tests/auto/linguist/lupdate/testdata/good/proparsing2/project.ts.result b/tests/auto/linguist/lupdate/testdata/good/proparsing2/project.ts.result
new file mode 100644
index 0000000000..2e606960e8
--- /dev/null
+++ b/tests/auto/linguist/lupdate/testdata/good/proparsing2/project.ts.result
@@ -0,0 +1,62 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE TS>
+<TS version="2.0">
+<context>
+ <name>QLineEdit</name>
+ <message>
+ <location filename="a" line="3"/>
+ <source>a</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="a.cpp" line="3"/>
+ <source>a.cpp</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="b" line="3"/>
+ <source>b</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="b.cpp" line="3"/>
+ <source>b.cpp</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="e" line="3"/>
+ <source>e</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="f/g.cpp" line="3"/>
+ <source>f/g.cpp</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="spaces/z" line="3"/>
+ <source>spaces/z</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="variable_with_spaces" line="3"/>
+ <source>variable with spaces</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="with" line="3"/>
+ <source>with</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="x/d" line="3"/>
+ <source>x/d</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="x/variable" line="3"/>
+ <source>x/variable</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+</TS>
diff --git a/tests/auto/linguist/lupdate/testdata/good/proparsing2/spaces/z b/tests/auto/linguist/lupdate/testdata/good/proparsing2/spaces/z
new file mode 100644
index 0000000000..34364d6bf0
--- /dev/null
+++ b/tests/auto/linguist/lupdate/testdata/good/proparsing2/spaces/z
@@ -0,0 +1,4 @@
+QString func()
+{
+ return QLineEdit::tr("spaces/z");
+}
diff --git a/tests/auto/linguist/lupdate/testdata/good/proparsing2/variable_with_spaces b/tests/auto/linguist/lupdate/testdata/good/proparsing2/variable_with_spaces
new file mode 100644
index 0000000000..cf56fc46e7
--- /dev/null
+++ b/tests/auto/linguist/lupdate/testdata/good/proparsing2/variable_with_spaces
@@ -0,0 +1,4 @@
+QString func()
+{
+ return QLineEdit::tr("variable with spaces");
+}
diff --git a/tests/auto/linguist/lupdate/testdata/good/proparsing2/with b/tests/auto/linguist/lupdate/testdata/good/proparsing2/with
new file mode 100644
index 0000000000..a156ca1766
--- /dev/null
+++ b/tests/auto/linguist/lupdate/testdata/good/proparsing2/with
@@ -0,0 +1,4 @@
+QString func()
+{
+ return QLineEdit::tr("with");
+}
diff --git a/tests/auto/linguist/lupdate/testdata/good/proparsing2/x/d b/tests/auto/linguist/lupdate/testdata/good/proparsing2/x/d
new file mode 100644
index 0000000000..e2effdecf4
--- /dev/null
+++ b/tests/auto/linguist/lupdate/testdata/good/proparsing2/x/d
@@ -0,0 +1,4 @@
+QString func()
+{
+ return QLineEdit::tr("x/d");
+}
diff --git a/tests/auto/linguist/lupdate/testdata/good/proparsing2/x/variable b/tests/auto/linguist/lupdate/testdata/good/proparsing2/x/variable
new file mode 100644
index 0000000000..a86e387581
--- /dev/null
+++ b/tests/auto/linguist/lupdate/testdata/good/proparsing2/x/variable
@@ -0,0 +1,4 @@
+QString func()
+{
+ return QLineEdit::tr("x/variable");
+}