diff options
Diffstat (limited to 'tests/auto')
7 files changed, 80 insertions, 0 deletions
diff --git a/tests/auto/linguist/lupdate/testdata/good/proparsingpaths/file1.cpp b/tests/auto/linguist/lupdate/testdata/good/proparsingpaths/file1.cpp new file mode 100644 index 0000000..ad87e70 --- /dev/null +++ b/tests/auto/linguist/lupdate/testdata/good/proparsingpaths/file1.cpp @@ -0,0 +1,9 @@ +// 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!!! + + +void func1() { + QApplication::tr("Hello world", "top-level wildcard"); +} + + diff --git a/tests/auto/linguist/lupdate/testdata/good/proparsingpaths/filter.cpp b/tests/auto/linguist/lupdate/testdata/good/proparsingpaths/filter.cpp new file mode 100644 index 0000000..912963d --- /dev/null +++ b/tests/auto/linguist/lupdate/testdata/good/proparsingpaths/filter.cpp @@ -0,0 +1,9 @@ +// 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!!! + + +void func1() { + QApplication::tr("Hello world", "top-level direct"); +} + + diff --git a/tests/auto/linguist/lupdate/testdata/good/proparsingpaths/project.pro b/tests/auto/linguist/lupdate/testdata/good/proparsingpaths/project.pro new file mode 100644 index 0000000..820b4fa --- /dev/null +++ b/tests/auto/linguist/lupdate/testdata/good/proparsingpaths/project.pro @@ -0,0 +1,10 @@ +SOURCES += file*.cpp filter.cpp non-existing.cpp + +include(sub/sub.pri) + +TRANSLATIONS = project.ts + +exists( $$TRANSLATIONS ) { + win32: system(del $$TRANSLATIONS) + unix: system(rm -f $$TRANSLATIONS) +} diff --git a/tests/auto/linguist/lupdate/testdata/good/proparsingpaths/project.ts.result b/tests/auto/linguist/lupdate/testdata/good/proparsingpaths/project.ts.result new file mode 100644 index 0000000..470d6eb --- /dev/null +++ b/tests/auto/linguist/lupdate/testdata/good/proparsingpaths/project.ts.result @@ -0,0 +1,31 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE TS> +<TS version="2.0"> +<context> + <name>QApplication</name> + <message> + <location filename="file1.cpp" line="6"/> + <source>Hello world</source> + <comment>top-level wildcard</comment> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="filter.cpp" line="6"/> + <source>Hello world</source> + <comment>top-level direct</comment> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="sub/subfile1.cpp" line="6"/> + <source>Hello world</source> + <comment>nested wildcard</comment> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="sub/subfilter.cpp" line="6"/> + <source>Hello world</source> + <comment>nested direct</comment> + <translation type="unfinished"></translation> + </message> +</context> +</TS> diff --git a/tests/auto/linguist/lupdate/testdata/good/proparsingpaths/sub/sub.pri b/tests/auto/linguist/lupdate/testdata/good/proparsingpaths/sub/sub.pri new file mode 100644 index 0000000..a6079f9 --- /dev/null +++ b/tests/auto/linguist/lupdate/testdata/good/proparsingpaths/sub/sub.pri @@ -0,0 +1,3 @@ +VPATH += $$PWD + +SOURCES += sub/subfile?.cpp subfilter.cpp diff --git a/tests/auto/linguist/lupdate/testdata/good/proparsingpaths/sub/subfile1.cpp b/tests/auto/linguist/lupdate/testdata/good/proparsingpaths/sub/subfile1.cpp new file mode 100644 index 0000000..807d296 --- /dev/null +++ b/tests/auto/linguist/lupdate/testdata/good/proparsingpaths/sub/subfile1.cpp @@ -0,0 +1,9 @@ +// 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!!! + + +void func1() { + QApplication::tr("Hello world", "nested wildcard"); +} + + diff --git a/tests/auto/linguist/lupdate/testdata/good/proparsingpaths/sub/subfilter.cpp b/tests/auto/linguist/lupdate/testdata/good/proparsingpaths/sub/subfilter.cpp new file mode 100644 index 0000000..6e5dd25 --- /dev/null +++ b/tests/auto/linguist/lupdate/testdata/good/proparsingpaths/sub/subfilter.cpp @@ -0,0 +1,9 @@ +// 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!!! + + +void func1() { + QApplication::tr("Hello world", "nested direct"); +} + + |