Add: test_backup_mirrors_absolute_path
This commit is contained in:
parent
52a9c347d1
commit
91b4485778
1 changed files with 14 additions and 0 deletions
|
@ -201,6 +201,20 @@ def test_link_force_overwrite_source(home, dotfiles, run_dotbot):
|
||||||
assert os.path.isfile(os.path.join(home, "dir", "f"))
|
assert os.path.isfile(os.path.join(home, "dir", "f"))
|
||||||
|
|
||||||
|
|
||||||
|
def test_backup_mirrors_absolute_path(home, dotfiles, run_dotbot):
|
||||||
|
"""Verify backup path from backup dir is same as original path from root."""
|
||||||
|
|
||||||
|
os.symlink(home, os.path.join(home, ".f"))
|
||||||
|
dotfiles.write("f")
|
||||||
|
|
||||||
|
backup_root = os.path.join(dotfiles.directory, "backup")
|
||||||
|
config = [{"link": {"~/.f": {"path": "f", "force": True, "backup-root": backup_root}}}]
|
||||||
|
dotfiles.write_config(config)
|
||||||
|
run_dotbot()
|
||||||
|
|
||||||
|
assert os.path.isdir(os.path.join(backup_root, home[1:]))
|
||||||
|
|
||||||
|
|
||||||
def test_link_force_backups_source(home, dotfiles, run_dotbot):
|
def test_link_force_backups_source(home, dotfiles, run_dotbot):
|
||||||
"""Verify force backups a symlinked directory."""
|
"""Verify force backups a symlinked directory."""
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue