| 89 | |
| 90 | |
| 91 | void PackageManifestTest::test_inspect() { |
| 92 | auto path = QFINDTESTDATA("testdata/PackageManifest/inspect_win/"); |
| 93 | auto manifest = Package::fromInspectedFolder(path); |
| 94 | QVERIFY(manifest.valid == true); |
| 95 | QVERIFY(manifest.files.size() == 2); |
| 96 | QVERIFY(manifest.files.count(Path("a/b.txt"))); |
| 97 | auto &file1 = manifest.files[Path("a/b.txt")]; |
| 98 | QVERIFY(file1.executable == false); |
| 99 | QVERIFY(file1.hash == "da39a3ee5e6b4b0d3255bfef95601890afd80709"); |
| 100 | QVERIFY(file1.size == 0); |
| 101 | QVERIFY(manifest.files.count(Path("a/b/b.txt"))); |
| 102 | auto &file2 = manifest.files[Path("a/b/b.txt")]; |
| 103 | QVERIFY(file2.executable == false); |
| 104 | QVERIFY(file2.hash == "da39a3ee5e6b4b0d3255bfef95601890afd80709"); |
| 105 | QVERIFY(file2.size == 0); |
| 106 | QVERIFY(manifest.folders.size() == 3); |
| 107 | QVERIFY(manifest.folders.count(Path("."))); |
| 108 | QVERIFY(manifest.folders.count(Path("a"))); |
| 109 | QVERIFY(manifest.folders.count(Path("a/b"))); |
| 110 | QVERIFY(manifest.symlinks.size() == 0); |
| 111 | } |
| 112 | |
| 113 | #ifndef Q_OS_WIN32 |
| 114 | void PackageManifestTest::test_inspect_symlinks() { |