summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorDenis Dzyubenko <denis.dzyubenko@nokia.com>2009-06-11 19:00:49 (GMT)
committerDenis Dzyubenko <denis.dzyubenko@nokia.com>2009-06-11 19:04:16 (GMT)
commit66f34c40dbc52b76434db4ccac6c43101bd57e1e (patch)
tree91275898617658cdf4e72633a9b5d621f740571e /tests
parentf6aa5d8cfbec4f4ffacf20a94a1653c1a8ee2134 (diff)
downloadQt-66f34c40dbc52b76434db4ccac6c43101bd57e1e.zip
Qt-66f34c40dbc52b76434db4ccac6c43101bd57e1e.tar.gz
Qt-66f34c40dbc52b76434db4ccac6c43101bd57e1e.tar.bz2
Fixed qtextcodec autotest so it can be run from a build directory.
Reviewed-by: trustme
Diffstat (limited to 'tests')
-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 e52bb7a..9c07e76 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 88dbaf7..1802c3e 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();