aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authortimoreo <contact@timoreo.fr>2022-11-01 09:56:16 +0100
committerGitHub <noreply@github.com>2022-11-01 09:56:16 +0100
commit04b39294ba012721279ca9d009f99f75178fd57a (patch)
tree1f0868f170d867bc77e1dcdac0168c6cbb794725 /tests
parent3a446c410cc6200b3ca05a03867daabdb7b32b30 (diff)
parent81333515e0ecfa0ad0880032808a220a3f463e30 (diff)
downloadPrismLauncher-04b39294ba012721279ca9d009f99f75178fd57a.tar.gz
PrismLauncher-04b39294ba012721279ca9d009f99f75178fd57a.tar.bz2
PrismLauncher-04b39294ba012721279ca9d009f99f75178fd57a.zip
Merge pull request #333 from flowln/fix_atl_packs_post_modpack_update
Diffstat (limited to 'tests')
-rw-r--r--tests/FileSystem_test.cpp26
1 files changed, 26 insertions, 0 deletions
diff --git a/tests/FileSystem_test.cpp b/tests/FileSystem_test.cpp
index 47a963b0..21270f6f 100644
--- a/tests/FileSystem_test.cpp
+++ b/tests/FileSystem_test.cpp
@@ -183,6 +183,32 @@ slots:
f();
}
+ void test_copy_single_file()
+ {
+ QTemporaryDir tempDir;
+ tempDir.setAutoRemove(true);
+
+ {
+ QString file = QFINDTESTDATA("testdata/FileSystem/test_folder/pack.mcmeta");
+
+ qDebug() << "From:" << file << "To:" << tempDir.path();
+
+ QDir target_dir(FS::PathCombine(tempDir.path(), "pack.mcmeta"));
+ qDebug() << tempDir.path();
+ qDebug() << target_dir.path();
+ FS::copy c(file, target_dir.filePath("pack.mcmeta"));
+ c();
+
+ auto filter = QDir::Filter::Files;
+
+ for (auto entry: target_dir.entryList(filter)) {
+ qDebug() << entry;
+ }
+
+ QVERIFY(target_dir.entryList(filter).contains("pack.mcmeta"));
+ }
+ }
+
void test_getDesktop()
{
QCOMPARE(FS::getDesktopDir(), QStandardPaths::writableLocation(QStandardPaths::DesktopLocation));