MCPcopy Create free account
hub / github.com/PolyMC/PolyMC / test_inspect_symlinks

Method test_inspect_symlinks

tests/PackageManifest_test.cpp:114–132  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

112
113#ifndef Q_OS_WIN32
114void 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
135void PackageManifestTest::mkdir_deep() {

Callers

nothing calls this directly

Calls 3

PathClass · 0.85
sizeMethod · 0.45
countMethod · 0.45

Tested by

no test coverage detected