From 1c28237e0c7a920823354d4a10381b300aeb95e0 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 20 Dec 2011 16:31:59 -0400 Subject: map: --fast disables use of dot to display map Generally useful, and allows the test suite to test it. --- test.hs | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'test.hs') diff --git a/test.hs b/test.hs index a3935cf66..aa2cd8be7 100644 --- a/test.hs +++ b/test.hs @@ -108,6 +108,7 @@ blackbox = TestLabel "blackbox" $ TestList , test_merge , test_status , test_sync + , test_map , test_hook_remote , test_directory_remote , test_rsync_remote @@ -526,6 +527,17 @@ test_sync :: Test test_sync = "git-annex sync" ~: intmpclonerepo $ do git_annex "sync" [] @? "sync failed" +test_map :: Test +test_map = "git-annex map" ~: intmpclonerepo $ do + -- set descriptions, that will be looked for in the map + git_annex "describe" [".", "this repo"] @? "describe 1 failed" + git_annex "describe" ["origin", "origin repo"] @? "describe 2 failed" + -- --fast avoids it running graphviz, not a build dependency + git_annex "map" ["--fast"] @? "map failed" + doesFileExist "map.dot" @? "map.dot not generated" + c <- readFile "map.dot" + not ("this repo" `isInfixOf` c && "origin repo" `isInfixOf` c) @? "map.dot bad content" + test_hook_remote :: Test test_hook_remote = "git-annex hook remote" ~: intmpclonerepo $ do git_annex "initremote" (words "foo type=hook encryption=none hooktype=foo") @? "initremote failed" -- cgit v1.2.3