tests/auto/qfileinfo/tst_qfileinfo.cpp
branchRCL_3
changeset 4 3b1da2848fc7
parent 3 41300fa6a67c
child 30 5dc02b23752f
equal deleted inserted replaced
3:41300fa6a67c 4:3b1da2848fc7
     1 /****************************************************************************
     1 /****************************************************************************
     2 **
     2 **
     3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
     4 ** All rights reserved.
     4 ** All rights reserved.
     5 ** Contact: Nokia Corporation (qt-info@nokia.com)
     5 ** Contact: Nokia Corporation (qt-info@nokia.com)
     6 **
     6 **
     7 ** This file is part of the test suite of the Qt Toolkit.
     7 ** This file is part of the test suite of the Qt Toolkit.
     8 **
     8 **
  1072         QTest::newRow(qPrintable("drive." + info.path())) << info.path() << false;
  1072         QTest::newRow(qPrintable("drive." + info.path())) << info.path() << false;
  1073     }
  1073     }
  1074 
  1074 
  1075 #if defined(Q_OS_WIN) && !defined(Q_OS_WINCE)
  1075 #if defined(Q_OS_WIN) && !defined(Q_OS_WINCE)
  1076     QTest::newRow("C:/RECYCLER") << QString::fromLatin1("C:/RECYCLER") << true;
  1076     QTest::newRow("C:/RECYCLER") << QString::fromLatin1("C:/RECYCLER") << true;
  1077     QTest::newRow("C:/RECYCLER/.") << QString::fromLatin1("C:/RECYCLER/.") << false;
  1077     QTest::newRow("C:/RECYCLER/.") << QString::fromLatin1("C:/RECYCLER/.") << true;
  1078     QTest::newRow("C:/RECYCLER/..") << QString::fromLatin1("C:/RECYCLER/..") << false;
  1078     QTest::newRow("C:/RECYCLER/..") << QString::fromLatin1("C:/RECYCLER/..") << true;
  1079 #endif
  1079 #endif
  1080 #if defined(Q_OS_UNIX) && !defined(Q_OS_SYMBIAN)
  1080 #if defined(Q_OS_UNIX) && !defined(Q_OS_SYMBIAN)
  1081 
  1081 
  1082     if (!QDir("./.hidden-directory").exists()
  1082     if (!QDir("./.hidden-directory").exists()
  1083             && !QDir().mkdir("./.hidden-directory"))
  1083             && !QDir().mkdir("./.hidden-directory"))
  1084         qWarning("Unable to create directory './.hidden-directory'. Some tests will fail.");
  1084         qWarning("Unable to create directory './.hidden-directory'. Some tests will fail.");
  1085 
  1085 
  1086     QTest::newRow("./.hidden-directory") << QString("./.hidden-directory") << true;
       
  1087     QTest::newRow("./.hidden-directory/.") << QString("./.hidden-directory/.") << false;
       
  1088     QTest::newRow("./.hidden-directory/..") << QString("./.hidden-directory/..") << false;
       
  1089 
       
  1090     QTest::newRow("/path/to/.hidden-directory") << QDir::currentPath() + QString("/.hidden-directory") << true;
  1086     QTest::newRow("/path/to/.hidden-directory") << QDir::currentPath() + QString("/.hidden-directory") << true;
  1091     QTest::newRow("/path/to/.hidden-directory/.") << QDir::currentPath() + QString("/.hidden-directory/.") << false;
  1087     QTest::newRow("/path/to/.hidden-directory/.") << QDir::currentPath() + QString("/.hidden-directory/.") << true;
  1092     QTest::newRow("/path/to/.hidden-directory/..") << QDir::currentPath() + QString("/.hidden-directory/..") << false;
  1088     QTest::newRow("/path/to/.hidden-directory/..") << QDir::currentPath() + QString("/.hidden-directory/..") << true;
  1093 #endif
  1089 #endif
  1094 
  1090 
  1095 #if defined(Q_OS_MAC)
  1091 #if defined(Q_OS_MAC)
  1096     // /bin has the hidden attribute on Mac OS X
  1092     // /bin has the hidden attribute on Mac OS X
  1097     QTest::newRow("/bin/") << QString::fromLatin1("/bin/") << true;
  1093     QTest::newRow("/bin/") << QString::fromLatin1("/bin/") << true;