equal
deleted
inserted
replaced
478 QTest::newRow("noreadfile") << QString("noreadfile") << int(QIODevice::ReadOnly) |
478 QTest::newRow("noreadfile") << QString("noreadfile") << int(QIODevice::ReadOnly) |
479 << (bool)FALSE << QFile::OpenError; |
479 << (bool)FALSE << QFile::OpenError; |
480 #if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) |
480 #if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) |
481 QTest::newRow("//./PhysicalDrive0") << QString("//./PhysicalDrive0") << int(QIODevice::ReadOnly) |
481 QTest::newRow("//./PhysicalDrive0") << QString("//./PhysicalDrive0") << int(QIODevice::ReadOnly) |
482 << (bool)TRUE << QFile::NoError; |
482 << (bool)TRUE << QFile::NoError; |
483 QTest::newRow("uncFile") << "//" + QtNetworkSettings::winServerName() + "/testsharewritable/test.pri" << int(QIODevice::ReadOnly) |
483 QTest::newRow("uncFile") << "//" + QtNetworkSettings::winServerName() + "/testshare/test.pri" << int(QIODevice::ReadOnly) |
484 << true << QFile::NoError; |
484 << true << QFile::NoError; |
485 #endif |
485 #endif |
486 } |
486 } |
487 |
487 |
488 void tst_QFile::open() |
488 void tst_QFile::open() |
550 QTest::addColumn<qint64>("size"); |
550 QTest::addColumn<qint64>("size"); |
551 |
551 |
552 QTest::newRow( "exist01" ) << QString(SRCDIR "testfile.txt") << (qint64)245; |
552 QTest::newRow( "exist01" ) << QString(SRCDIR "testfile.txt") << (qint64)245; |
553 #if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) |
553 #if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) |
554 // Only test UNC on Windows./ |
554 // Only test UNC on Windows./ |
555 QTest::newRow("unc") << "//" + QString(QtNetworkSettings::winServerName() + "/testsharewritable/test.pri") << (qint64)34; |
555 QTest::newRow("unc") << "//" + QString(QtNetworkSettings::winServerName() + "/testshare/test.pri") << (qint64)34; |
556 #endif |
556 #endif |
557 } |
557 } |
558 |
558 |
559 void tst_QFile::size() |
559 void tst_QFile::size() |
560 { |
560 { |
2471 |
2471 |
2472 void tst_QFile::miscWithUncPathAsCurrentDir() |
2472 void tst_QFile::miscWithUncPathAsCurrentDir() |
2473 { |
2473 { |
2474 #if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) |
2474 #if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) |
2475 QString current = QDir::currentPath(); |
2475 QString current = QDir::currentPath(); |
2476 QVERIFY(QDir::setCurrent("//" + QtNetworkSettings::winServerName() + "/testsharewritable")); |
2476 QVERIFY(QDir::setCurrent("//" + QtNetworkSettings::winServerName() + "/testshare")); |
2477 QFile file("test.pri"); |
2477 QFile file("test.pri"); |
2478 QVERIFY(file.exists()); |
2478 QVERIFY(file.exists()); |
2479 QCOMPARE(int(file.size()), 34); |
2479 QCOMPARE(int(file.size()), 34); |
2480 QVERIFY(file.open(QIODevice::ReadOnly)); |
2480 QVERIFY(file.open(QIODevice::ReadOnly)); |
2481 QVERIFY(QDir::setCurrent(current)); |
2481 QVERIFY(QDir::setCurrent(current)); |