From 084aba8aaf43fed5d9c694c19ff1cd53e7b16bc8 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 21 Sep 2012 00:49:48 -0400 Subject: fix breakage caught by test suite Can't use show-ref --tags --branches, as that omits remote branches. Instead, filter out the synced refs directly. --- test.hs | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'test.hs') diff --git a/test.hs b/test.hs index c27fa8a7b..c4c85af05 100644 --- a/test.hs +++ b/test.hs @@ -475,33 +475,33 @@ test_unused = "git-annex unused/dropunused" ~: intmpclonerepo $ do sha1annexedfilekey <- annexeval $ findkey sha1annexedfile git_annex "get" [annexedfile] @? "get of file failed" git_annex "get" [sha1annexedfile] @? "get of file failed" - checkunused [] + checkunused [] "after get" boolSystem "git" [Params "rm -q", File annexedfile] @? "git rm failed" - checkunused [] + checkunused [] "after rm" boolSystem "git" [Params "commit -q -m foo"] @? "git commit failed" - checkunused [] + checkunused [] "after commit" -- unused checks origin/master; once it's gone it is really unused boolSystem "git" [Params "remote rm origin"] @? "git remote rm origin failed" - checkunused [annexedfilekey] + checkunused [annexedfilekey] "after origin branches are gone" boolSystem "git" [Params "rm -q", File sha1annexedfile] @? "git rm failed" boolSystem "git" [Params "commit -q -m foo"] @? "git commit failed" - checkunused [annexedfilekey, sha1annexedfilekey] + checkunused [annexedfilekey, sha1annexedfilekey] "after rm sha1annexedfile" -- good opportunity to test dropkey also git_annex "dropkey" ["--force", Types.Key.key2file annexedfilekey] @? "dropkey failed" - checkunused [sha1annexedfilekey] + checkunused [sha1annexedfilekey] ("after dropkey --force " ++ Types.Key.key2file annexedfilekey) git_annex "dropunused" ["1", "2"] @? "dropunused failed" - checkunused [] + checkunused [] "after dropunused" git_annex "dropunused" ["10", "501"] @? "dropunused failed on bogus numbers" where - checkunused expectedkeys = do + checkunused expectedkeys desc = do git_annex "unused" [] @? "unused failed" unusedmap <- annexeval $ Logs.Unused.readUnusedLog "" let unusedkeys = M.elems unusedmap - assertEqual "unused keys differ" + assertEqual ("unused keys differ " ++ desc) (sort expectedkeys) (sort unusedkeys) findkey f = do r <- Backend.lookupFile f -- cgit v1.2.3