| 663 | } |
| 664 | |
| 665 | void TestPath::testHasParent_data() |
| 666 | { |
| 667 | QTest::addColumn<QString>("input"); |
| 668 | QTest::addColumn<bool>("hasParent"); |
| 669 | |
| 670 | QTest::newRow("empty") << QString() << false; |
| 671 | #ifdef Q_OS_WIN |
| 672 | QTest::newRow("\\") << QStringLiteral("\\") << true; // true b/c parent could be e.g. 'C:' |
| 673 | #else |
| 674 | QTest::newRow("/") << QStringLiteral("/") << false; |
| 675 | QTest::newRow("/foo") << QStringLiteral("/foo") << true; |
| 676 | QTest::newRow("/foo/bar") << QStringLiteral("/foo/bar") << true; |
| 677 | QTest::newRow("//foo/bar") << QStringLiteral("//foo/bar") << true; |
| 678 | #endif |
| 679 | QTest::newRow("http://foo.bar") << QStringLiteral("http://foo.bar") << false; |
| 680 | QTest::newRow("http://foo.bar/") << QStringLiteral("http://foo.bar/") << false; |
| 681 | QTest::newRow("http://foo.bar/asdf") << QStringLiteral("http://foo.bar/asdf") << true; |
| 682 | QTest::newRow("http://foo.bar/asdf/asdf") << QStringLiteral("http://foo.bar/asdf/asdf") << true; |
| 683 | } |
| 684 | |
| 685 | void TestPath::testHasParent() |
| 686 | { |