diff options
Diffstat (limited to 'tests/auto/linguist/lupdate/testdata/good/proparsing2')
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 0000000..5966392 --- /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 0000000..1d80ed3 --- /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 0000000..d0fe066 --- /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 0000000..a5c386d --- /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 0000000..66e89a8 --- /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 0000000..d86bee2 --- /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 0000000..5bd8d03 --- /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 0000000..1d6895a --- /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 0000000..2e60696 --- /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 0000000..34364d6 --- /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 0000000..cf56fc4 --- /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 0000000..a156ca1 --- /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 0000000..e2effde --- /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 0000000..a86e387 --- /dev/null +++ b/tests/auto/linguist/lupdate/testdata/good/proparsing2/x/variable @@ -0,0 +1,4 @@ +QString func() +{ + return QLineEdit::tr("x/variable"); +} |