diff options
author | Oswald Buddenhagen <oswald.buddenhagen@nokia.com> | 2010-01-06 11:51:02 (GMT) |
---|---|---|
committer | Oswald Buddenhagen <oswald.buddenhagen@nokia.com> | 2010-01-06 18:16:22 (GMT) |
commit | a54a8961bad16c55bd0a56896dec42de875cc0b4 (patch) | |
tree | 2d85c7b828e4bffbf0274dcaac262f79f9fd7df6 /tests/auto/linguist | |
parent | 1ee6d3dc9529be1304c5d546e92bf1db832b5bb4 (diff) | |
download | Qt-a54a8961bad16c55bd0a56896dec42de875cc0b4.zip Qt-a54a8961bad16c55bd0a56896dec42de875cc0b4.tar.gz Qt-a54a8961bad16c55bd0a56896dec42de875cc0b4.tar.bz2 |
move equivalent of output_ts test to good/
Diffstat (limited to 'tests/auto/linguist')
-rw-r--r-- | tests/auto/linguist/lupdate/.gitignore | 2 | ||||
-rw-r--r-- | tests/auto/linguist/lupdate/testdata/good/reloutput/lupdatecmd | 2 | ||||
-rw-r--r-- | tests/auto/linguist/lupdate/testdata/good/reloutput/main.cpp (renamed from tests/auto/linguist/lupdate/testdata/output_ts/toplevel/library/tools/main.cpp) | 0 | ||||
-rw-r--r-- | tests/auto/linguist/lupdate/testdata/good/reloutput/project.pro (renamed from tests/auto/linguist/lupdate/testdata/output_ts/toplevel/library/tools/tools.pro) | 0 | ||||
-rw-r--r-- | tests/auto/linguist/lupdate/testdata/good/reloutput/translations/project.ts.result (renamed from tests/auto/linguist/lupdate/testdata/output_ts/project.ts.result) | 0 | ||||
-rw-r--r-- | tests/auto/linguist/lupdate/testdata/output_ts/lupdatecmd | 1 | ||||
-rw-r--r-- | tests/auto/linguist/lupdate/testdata/output_ts/toplevel/library/tools/translations/readme.txt | 2 | ||||
-rw-r--r-- | tests/auto/linguist/lupdate/tst_lupdate.cpp | 49 |
8 files changed, 3 insertions, 53 deletions
diff --git a/tests/auto/linguist/lupdate/.gitignore b/tests/auto/linguist/lupdate/.gitignore index 4ba5b79..389f2dc 100644 --- a/tests/auto/linguist/lupdate/.gitignore +++ b/tests/auto/linguist/lupdate/.gitignore @@ -1,4 +1,4 @@ tst_lupdate testdata/good/*/project.ts -testdata/output_ts/toplevel/library/tools/translations/project.ts +testdata/good/*/*/project.ts testdata/recursivescan/*.ts diff --git a/tests/auto/linguist/lupdate/testdata/good/reloutput/lupdatecmd b/tests/auto/linguist/lupdate/testdata/good/reloutput/lupdatecmd new file mode 100644 index 0000000..da6103f --- /dev/null +++ b/tests/auto/linguist/lupdate/testdata/good/reloutput/lupdatecmd @@ -0,0 +1,2 @@ +TRANSLATION: translations/project.ts +lupdate project.pro -ts translations/project.ts diff --git a/tests/auto/linguist/lupdate/testdata/output_ts/toplevel/library/tools/main.cpp b/tests/auto/linguist/lupdate/testdata/good/reloutput/main.cpp index 5a681e2..5a681e2 100644 --- a/tests/auto/linguist/lupdate/testdata/output_ts/toplevel/library/tools/main.cpp +++ b/tests/auto/linguist/lupdate/testdata/good/reloutput/main.cpp diff --git a/tests/auto/linguist/lupdate/testdata/output_ts/toplevel/library/tools/tools.pro b/tests/auto/linguist/lupdate/testdata/good/reloutput/project.pro index 5d263ae..5d263ae 100644 --- a/tests/auto/linguist/lupdate/testdata/output_ts/toplevel/library/tools/tools.pro +++ b/tests/auto/linguist/lupdate/testdata/good/reloutput/project.pro diff --git a/tests/auto/linguist/lupdate/testdata/output_ts/project.ts.result b/tests/auto/linguist/lupdate/testdata/good/reloutput/translations/project.ts.result index e398701..e398701 100644 --- a/tests/auto/linguist/lupdate/testdata/output_ts/project.ts.result +++ b/tests/auto/linguist/lupdate/testdata/good/reloutput/translations/project.ts.result diff --git a/tests/auto/linguist/lupdate/testdata/output_ts/lupdatecmd b/tests/auto/linguist/lupdate/testdata/output_ts/lupdatecmd deleted file mode 100644 index d3a5bf7..0000000 --- a/tests/auto/linguist/lupdate/testdata/output_ts/lupdatecmd +++ /dev/null @@ -1 +0,0 @@ -lupdate toplevel/library/tools/tools.pro diff --git a/tests/auto/linguist/lupdate/testdata/output_ts/toplevel/library/tools/translations/readme.txt b/tests/auto/linguist/lupdate/testdata/output_ts/toplevel/library/tools/translations/readme.txt deleted file mode 100644 index 83adcd2..0000000 --- a/tests/auto/linguist/lupdate/testdata/output_ts/toplevel/library/tools/translations/readme.txt +++ /dev/null @@ -1,2 +0,0 @@ -This is just a dummy file so that GIT creates this folder - diff --git a/tests/auto/linguist/lupdate/tst_lupdate.cpp b/tests/auto/linguist/lupdate/tst_lupdate.cpp index 0442d27..73ede2f 100644 --- a/tests/auto/linguist/lupdate/tst_lupdate.cpp +++ b/tests/auto/linguist/lupdate/tst_lupdate.cpp @@ -60,7 +60,6 @@ public: private slots: void good_data(); void good(); - void output_ts(); void commandline_data(); void commandline(); #if CHECK_SIMTEXTH @@ -216,54 +215,6 @@ void tst_lupdate::good() doCompare(generatedtsfile, expectedFile, false); } -void tst_lupdate::output_ts() -{ - QString dir = m_basePath + "output_ts"; - m_lupdate.setWorkingDirectory(dir); - - // look for a command - QString lupdatecmd; - QFile file(dir + "/lupdatecmd"); - if (file.exists()) { - QVERIFY(file.open(QIODevice::ReadOnly | QIODevice::Text)); - while (!file.atEnd()) { - QByteArray cmdstring = file.readLine().simplified(); - if (cmdstring.startsWith('#')) - continue; - if (cmdstring.startsWith("lupdate")) { - cmdstring.remove(0, 8); - lupdatecmd.append(cmdstring); - break; - } - } - file.close(); - } - - QDir parsingDir(m_basePath + "output_ts"); - - QString generatedtsfile = - dir + QLatin1String("/toplevel/library/tools/translations/project.ts"); - - QFile::remove(generatedtsfile); - - lupdatecmd.prepend("-silent "); - m_lupdate.qmake(); - m_lupdate.updateProFile(lupdatecmd); - - // If the file expectedoutput.txt exists, compare the - // console output with the content of that file - QFile outfile(dir + "/expectedoutput.txt"); - if (outfile.exists()) { - QString errs = m_lupdate.getErrorMessages().at(1).trimmed(); - QStringList errslist = errs.split(QLatin1Char('\n')); - doCompare(errslist, outfile.fileName(), true); - if (QTest::currentTestFailed()) - return; - } - - doCompare(generatedtsfile, dir + QLatin1String("/project.ts.result"), false); -} - void tst_lupdate::commandline_data() { QTest::addColumn<QString>("currentPath"); |