| 112 | |
| 113 | #ifndef Q_OS_WIN32 |
| 114 | void PackageManifestTest::test_inspect_symlinks() { |
| 115 | auto path = QFINDTESTDATA("testdata/PackageManifest/inspect/"); |
| 116 | auto manifest = Package::fromInspectedFolder(path); |
| 117 | QVERIFY(manifest.valid == true); |
| 118 | QVERIFY(manifest.files.size() == 1); |
| 119 | QVERIFY(manifest.files.count(Path("a/b.txt"))); |
| 120 | auto &file = manifest.files[Path("a/b.txt")]; |
| 121 | QVERIFY(file.executable == true); |
| 122 | QVERIFY(file.hash == "da39a3ee5e6b4b0d3255bfef95601890afd80709"); |
| 123 | QVERIFY(file.size == 0); |
| 124 | QVERIFY(manifest.folders.size() == 3); |
| 125 | QVERIFY(manifest.folders.count(Path("."))); |
| 126 | QVERIFY(manifest.folders.count(Path("a"))); |
| 127 | QVERIFY(manifest.folders.count(Path("a/b"))); |
| 128 | QVERIFY(manifest.symlinks.size() == 1); |
| 129 | QVERIFY(manifest.symlinks.count(Path("a/b/b.txt"))); |
| 130 | qDebug() << manifest.symlinks[Path("a/b/b.txt")]; |
| 131 | QVERIFY(manifest.symlinks[Path("a/b/b.txt")] == Path("../b.txt")); |
| 132 | } |
| 133 | #endif |
| 134 | |
| 135 | void PackageManifestTest::mkdir_deep() { |