diff options
author | Wojciech Siewierski <wojciech.siewierski@onet.pl> | 2018-12-26 16:14:19 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-12-26 16:14:19 +0100 |
commit | aecce4a251910c9da2d58017eccaefbd22edc4cb (patch) | |
tree | 397d68f4219a210eb41615c2ea9b75956a3fd40d /tests | |
parent | 71c7564107a7e7ae22a55190d16c5eba4615f4a0 (diff) | |
parent | 7f20f31379eec35b97c138186d11d0265c9429f3 (diff) | |
download | ranger-aecce4a251910c9da2d58017eccaefbd22edc4cb.tar.gz |
Merge branch 'master' into anypathmacro
Diffstat (limited to 'tests')
-rw-r--r-- | tests/ranger/container/test_bookmarks.py | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/ranger/container/test_bookmarks.py b/tests/ranger/container/test_bookmarks.py index 6fba2a3d..64192c06 100644 --- a/tests/ranger/container/test_bookmarks.py +++ b/tests/ranger/container/test_bookmarks.py @@ -56,3 +56,20 @@ def testbookmarks(tmpdir): secondstore.update_if_outdated() secondstore.update = origupdate secondstore.update_if_outdated() + + +def test_bookmark_symlink(tmpdir): + # Initialize plain file and symlink paths + bookmarkfile_link = tmpdir.join("bookmarkfile") + bookmarkfile_orig = tmpdir.join("bookmarkfile.orig") + + # Create symlink pointing towards the original plain file. + os.symlink(str(bookmarkfile_orig), str(bookmarkfile_link)) + + # Initialize the bookmark file and save the file. + bmstore = Bookmarks(str(bookmarkfile_link)) + bmstore.save() + + # Once saved, the bookmark file should still be a symlink pointing towards the plain file. + assert os.path.islink(str(bookmarkfile_link)) + assert not os.path.islink(str(bookmarkfile_orig)) |