summaryrefslogtreecommitdiff
path: root/tests/auto/linguist
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@nokia.com>2010-01-26 20:16:59 +0100
committerOswald Buddenhagen <oswald.buddenhagen@nokia.com>2010-01-27 16:12:32 +0100
commitdf9a6a9bf9d7bf3609ac034e705d076b82572333 (patch)
treea30579d26d6d377f19c4dc830af9250aa9e72580 /tests/auto/linguist
parent7c824cff70d528644b992595f3195f9fd2474fc2 (diff)
downloadqt4-tools-df9a6a9bf9d7bf3609ac034e705d076b82572333.tar.gz
absorb cmdline tests into "good" structure
Diffstat (limited to 'tests/auto/linguist')
-rw-r--r--tests/auto/linguist/lupdate/.gitignore1
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/cmdline_deeppath/lupdatecmd2
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/cmdline_deeppath/project.ts.result (renamed from tests/auto/linguist/lupdate/testdata/recursivescan/bar.ts.result)0
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/cmdline_recurse/lupdatecmd2
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/cmdline_recurse/project.ts.result (renamed from tests/auto/linguist/lupdate/testdata/recursivescan/foo.ts.result)0
-rw-r--r--tests/auto/linguist/lupdate/tst_lupdate.cpp41
6 files changed, 4 insertions, 42 deletions
diff --git a/tests/auto/linguist/lupdate/.gitignore b/tests/auto/linguist/lupdate/.gitignore
index 389f2dc8bf..3572c82b16 100644
--- a/tests/auto/linguist/lupdate/.gitignore
+++ b/tests/auto/linguist/lupdate/.gitignore
@@ -1,4 +1,3 @@
tst_lupdate
testdata/good/*/project.ts
testdata/good/*/*/project.ts
-testdata/recursivescan/*.ts
diff --git a/tests/auto/linguist/lupdate/testdata/good/cmdline_deeppath/lupdatecmd b/tests/auto/linguist/lupdate/testdata/good/cmdline_deeppath/lupdatecmd
new file mode 100644
index 0000000000..301d839a7b
--- /dev/null
+++ b/tests/auto/linguist/lupdate/testdata/good/cmdline_deeppath/lupdatecmd
@@ -0,0 +1,2 @@
+cd ../../recursivescan
+lupdate sub/finddialog.cpp -ts project.ts
diff --git a/tests/auto/linguist/lupdate/testdata/recursivescan/bar.ts.result b/tests/auto/linguist/lupdate/testdata/good/cmdline_deeppath/project.ts.result
index 5c3c21c34b..5c3c21c34b 100644
--- a/tests/auto/linguist/lupdate/testdata/recursivescan/bar.ts.result
+++ b/tests/auto/linguist/lupdate/testdata/good/cmdline_deeppath/project.ts.result
diff --git a/tests/auto/linguist/lupdate/testdata/good/cmdline_recurse/lupdatecmd b/tests/auto/linguist/lupdate/testdata/good/cmdline_recurse/lupdatecmd
new file mode 100644
index 0000000000..1814e67ca5
--- /dev/null
+++ b/tests/auto/linguist/lupdate/testdata/good/cmdline_recurse/lupdatecmd
@@ -0,0 +1,2 @@
+cd ../../recursivescan
+lupdate . -ts project.ts
diff --git a/tests/auto/linguist/lupdate/testdata/recursivescan/foo.ts.result b/tests/auto/linguist/lupdate/testdata/good/cmdline_recurse/project.ts.result
index 95a34fa80d..95a34fa80d 100644
--- a/tests/auto/linguist/lupdate/testdata/recursivescan/foo.ts.result
+++ b/tests/auto/linguist/lupdate/testdata/good/cmdline_recurse/project.ts.result
diff --git a/tests/auto/linguist/lupdate/tst_lupdate.cpp b/tests/auto/linguist/lupdate/tst_lupdate.cpp
index b45383fc52..c179462d27 100644
--- a/tests/auto/linguist/lupdate/tst_lupdate.cpp
+++ b/tests/auto/linguist/lupdate/tst_lupdate.cpp
@@ -59,8 +59,6 @@ public:
private slots:
void good_data();
void good();
- void commandline_data();
- void commandline();
#if CHECK_SIMTEXTH
void simtexth();
void simtexth_data();
@@ -313,45 +311,6 @@ void tst_lupdate::good()
dir + QLatin1Char('/') + ts + QLatin1String(".result"), false);
}
-void tst_lupdate::commandline_data()
-{
- QTest::addColumn<QString>("currentPath");
- QTest::addColumn<QString>("commandline");
- QTest::addColumn<QString>("generatedtsfile");
- QTest::addColumn<QString>("expectedtsfile");
-
- QTest::newRow("Recursive scan") << QString("recursivescan")
- << QString(". -ts foo.ts") << QString("foo.ts") << QString("foo.ts.result");
- QTest::newRow("Deep path argument") << QString("recursivescan")
- << QString("sub/finddialog.cpp -ts bar.ts") << QString("bar.ts") << QString("bar.ts.result");
-}
-
-void tst_lupdate::commandline()
-{
- QFETCH(QString, currentPath);
- QFETCH(QString, commandline);
- QFETCH(QString, generatedtsfile);
- QFETCH(QString, expectedtsfile);
-
- QString generated =
- m_basePath + currentPath + QLatin1Char('/') + generatedtsfile;
- QFile gen(generated);
- if (gen.exists())
- QVERIFY(gen.remove());
- QProcess proc;
- proc.setWorkingDirectory(m_basePath + currentPath);
- proc.setProcessChannelMode(QProcess::MergedChannels);
- proc.start(m_cmdLupdate + " -silent " + commandline, QIODevice::ReadWrite | QIODevice::Text);
- QVERIFY2(proc.waitForFinished(5000), qPrintable(commandline));
- QVERIFY2(proc.exitStatus() == QProcess::NormalExit,
- "\"lupdate -silent " + commandline.toLatin1() + "\" crashed\n" + proc.readAll());
- QVERIFY2(!proc.exitCode(),
- "\"lupdate -silent " + commandline.toLatin1() + "\" exited with code " +
- QByteArray::number(proc.exitCode()) + "\n" + proc.readAll());
-
- doCompare(generated, m_basePath + currentPath + QLatin1Char('/') + expectedtsfile, false);
-}
-
#if CHECK_SIMTEXTH
void tst_lupdate::simtexth()
{