add test case for unused with unstaged link
This commit is contained in:
parent
338e7e805d
commit
5436fea39b
1 changed files with 11 additions and 0 deletions
11
Test.hs
11
Test.hs
|
@ -587,6 +587,17 @@ test_unused env = "git-annex unused/dropunused" ~: intmpclonerepoInDirect env $
|
|||
checkunused [] "after dropunused"
|
||||
not <$> git_annex env "dropunused" ["--force", "10", "501"] @? "dropunused failed to fail on bogus numbers"
|
||||
|
||||
-- unused used to miss symlinks that were not staged and pointed
|
||||
-- at annexed content, and think that content was unused
|
||||
writeFile "unusedfile" "unusedcontent"
|
||||
git_annex env "add" ["unusedfile"] @? "add of unusedfile failed"
|
||||
unusedfilekey <- annexeval $ findkey "unusedfile"
|
||||
renameFile "unusedfile" "unusedunstagedfile"
|
||||
boolSystem "git" [Params "rm -qf", File "unusedfile"] @? "git rm failed"
|
||||
checkunused [] "with unstaged link"
|
||||
removeFile "unusedunstagedfile"
|
||||
checkunused [unusedfilekey] "with unstaged link deleted"
|
||||
|
||||
where
|
||||
checkunused expectedkeys desc = do
|
||||
git_annex env "unused" [] @? "unused failed"
|
||||
|
|
Loading…
Add table
Reference in a new issue