update
This commit is contained in:
@@ -58,6 +58,9 @@ class TestPlanLink:
|
||||
plan = plan_link([new], current, _fs_check_none)
|
||||
types = [op.type for op in plan.operations]
|
||||
assert types == ["remove_link", "create_link"]
|
||||
assert plan.summary.updated == 1
|
||||
assert plan.summary.added == 0
|
||||
assert plan.summary.removed == 0
|
||||
|
||||
def test_unmanaged_file_at_target_is_conflict(self):
|
||||
desired = [_lt("/home/x/.zshrc")]
|
||||
@@ -71,6 +74,16 @@ class TestPlanLink:
|
||||
assert plan.summary.from_modules == 1
|
||||
|
||||
|
||||
def test_broken_symlink_is_repaired(self):
|
||||
lt = _lt("/home/x/.zshrc")
|
||||
current = LinkedState(links={Path("/home/x/.zshrc"): lt})
|
||||
plan = plan_link([lt], current, lambda p: "broken_symlink")
|
||||
types = [op.type for op in plan.operations]
|
||||
assert types == ["remove_link", "create_link"]
|
||||
assert plan.summary.updated == 1
|
||||
assert plan.summary.unchanged == 0
|
||||
|
||||
|
||||
class TestPlanUnlink:
|
||||
def test_unlink_all(self):
|
||||
lt = _lt("/home/x/.zshrc")
|
||||
|
||||
Reference in New Issue
Block a user