summaryrefslogtreecommitdiffstats
path: root/tests/auto/qtextcodec
diff options
context:
space:
mode:
authorDenis Dzyubenko <denis.dzyubenko@nokia.com>2009-06-11 21:00:49 +0200
committerDenis Dzyubenko <denis.dzyubenko@nokia.com>2009-06-11 21:04:16 +0200
commit66f34c40dbc52b76434db4ccac6c43101bd57e1e (patch)
tree91275898617658cdf4e72633a9b5d621f740571e /tests/auto/qtextcodec
parentf6aa5d8cfbec4f4ffacf20a94a1653c1a8ee2134 (diff)
Fixed qtextcodec autotest so it can be run from a build directory.
Reviewed-by: trustme
Diffstat (limited to 'tests/auto/qtextcodec')
-rw-r--r--tests/auto/qtextcodec/test/test.pro6
-rw-r--r--tests/auto/qtextcodec/tst_qtextcodec.cpp6
2 files changed, 6 insertions, 6 deletions
diff --git a/tests/auto/qtextcodec/test/test.pro b/tests/auto/qtextcodec/test/test.pro
index e52bb7a610..9c07e76763 100644
--- a/tests/auto/qtextcodec/test/test.pro
+++ b/tests/auto/qtextcodec/test/test.pro
@@ -6,7 +6,7 @@ wince*: {
addFiles.path = .
DEPLOYMENT += addFiles
DEPLOYMENT_PLUGIN += qcncodecs qjpcodecs qkrcodecs qtwcodecs
+ DEFINES += SRCDIR=\\\"\\\"
+} else {
+ DEFINES += SRCDIR=\\\"$$PWD/../\\\"
}
-
-
-
diff --git a/tests/auto/qtextcodec/tst_qtextcodec.cpp b/tests/auto/qtextcodec/tst_qtextcodec.cpp
index 88dbaf7902..1802c3eb65 100644
--- a/tests/auto/qtextcodec/tst_qtextcodec.cpp
+++ b/tests/auto/qtextcodec/tst_qtextcodec.cpp
@@ -95,8 +95,8 @@ void tst_QTextCodec::toUnicode_data()
QTest::addColumn<QString>("fileName");
QTest::addColumn<QString>("codecName");
- QTest::newRow( "korean-eucKR" ) << "korean.txt" << "eucKR";
- QTest::newRow( "UTF-8" ) << "utf8.txt" << "UTF-8";
+ QTest::newRow( "korean-eucKR" ) << SRCDIR "korean.txt" << "eucKR";
+ QTest::newRow( "UTF-8" ) << SRCDIR "utf8.txt" << "UTF-8";
}
void tst_QTextCodec::toUnicode()
@@ -237,7 +237,7 @@ void tst_QTextCodec::fromUnicode()
void tst_QTextCodec::toUnicode_codecForHtml()
{
- QFile file(QString("QT4-crashtest.txt"));
+ QFile file(QString(SRCDIR "QT4-crashtest.txt"));
QVERIFY(file.open(QFile::ReadOnly));
QByteArray data = file.readAll();