mirror of
https://github.com/audacity/linuxdeploy.git
synced 2026-06-27 14:56:57 -05:00
Add unit test for AppDir::deployFile
This commit is contained in:
committed by
TheAssassin
parent
47ff6c8e9d
commit
376eddb14d
@@ -149,6 +149,24 @@ namespace AppDirUnitTests {
|
||||
|
||||
if (!simple_icon_found)
|
||||
FAIL();
|
||||
}
|
||||
|
||||
|
||||
TEST_F(AppDirUnitTestsFixture, deployFile) {
|
||||
path filePath = SIMPLE_FILE_PATH;
|
||||
appDir.deployFile(filePath, tmpAppDir / "usr/share/doc/simple_application/");
|
||||
appDir.executeDeferredOperations();
|
||||
|
||||
bool simple_file_found = false;
|
||||
recursive_directory_iterator end_itr; // default construction yields past-the-end
|
||||
for (recursive_directory_iterator itr(tmpAppDir); itr != end_itr && (!simple_file_found); itr++) {
|
||||
const auto path = relative(itr->path(), tmpAppDir).filename().string();
|
||||
|
||||
if (path.find("simple_file.txt") != std::string::npos)
|
||||
simple_file_found = true;
|
||||
}
|
||||
|
||||
if (!simple_file_found)
|
||||
FAIL();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user