mirror of
https://github.com/audacity/linuxdeploy.git
synced 2026-07-02 20:08:02 -05:00
Add symlinkFile to the public AppDir interface (#42)
* Add symlinkFile to the public AppDir interface * Rename AppDir::symlinkFile to AppDir::createSymlink * change return value to bool * Remove duplicated header * Remove blank lines * Add comment * Fix test name * Change createSymlink signature. Name changed to createRelativeSymlink and remove the useRelativePath argument * Remove commented tests.
This commit is contained in:
committed by
TheAssassin
parent
542edaf410
commit
d9ca907da8
@@ -121,6 +121,20 @@ namespace AppDirTest {
|
||||
|
||||
ASSERT_TRUE(is_regular_file(destination));
|
||||
}
|
||||
|
||||
TEST_F(AppDirUnitTestsFixture, createSymlink) {
|
||||
auto destination = tmpAppDir / "usr/share/doc/simple_application/test123";
|
||||
appDir.deployFile(SIMPLE_FILE_PATH, destination);
|
||||
appDir.executeDeferredOperations();
|
||||
|
||||
ASSERT_TRUE(is_regular_file(destination));
|
||||
|
||||
appDir.createRelativeSymlink(destination, tmpAppDir / "relative_link");
|
||||
|
||||
auto res = read_symlink(tmpAppDir / "relative_link");
|
||||
auto expected = relative(destination, tmpAppDir);
|
||||
ASSERT_TRUE(res == expected);
|
||||
}
|
||||
}
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
|
||||
Reference in New Issue
Block a user