summaryrefslogtreecommitdiff
path: root/test.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2011-12-20 16:31:59 -0400
committerGravatar Joey Hess <joey@kitenet.net>2011-12-20 16:42:35 -0400
commit1c28237e0c7a920823354d4a10381b300aeb95e0 (patch)
tree06fd518394b3e94b07e4ffd71f5f21dabeba1e2f /test.hs
parent9308a60bb2457568bf600901f6dad5c96d6b53ba (diff)
map: --fast disables use of dot to display map
Generally useful, and allows the test suite to test it.
Diffstat (limited to 'test.hs')
-rw-r--r--test.hs12
1 files changed, 12 insertions, 0 deletions
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"