summaryrefslogtreecommitdiff
path: root/Test.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2014-02-03 14:32:07 -0400
committerGravatar Joey Hess <joey@kitenet.net>2014-02-03 14:32:07 -0400
commitc2c49d4c5ef1257b9163c21526d5111e2469c4d1 (patch)
tree3c648fb8a89be884fc34c5c197375787361652cd /Test.hs
parentbed679954ca3c6a4a456a8b1ce499447e5c71593 (diff)
fix broken test
f5d0c8f0bf7f018479eb4da7e8c41598b7aacb7d broke the mixed conflict resolution test. Since origin is no longer involved, both sides have to sync after pairing. (The sync before pairing is just to get a commit.)
Diffstat (limited to 'Test.hs')
-rw-r--r--Test.hs12
1 files changed, 6 insertions, 6 deletions
diff --git a/Test.hs b/Test.hs
index 8d2b7d3fd..779754677 100644
--- a/Test.hs
+++ b/Test.hs
@@ -827,19 +827,19 @@ test_mixed_conflict_resolution env = do
git_annex env "add" [conflictor] @? "add conflicter failed"
git_annex env "sync" [] @? "sync failed in r2"
pair env r1 r2
- let r = if inr1 then r1 else r2
- indir env r $ do
+ let l = if inr1 then [r1, r2] else [r2, r1]
+ forM_ l $ \r -> indir env r $
git_annex env "sync" [] @? "sync failed in mixed conflict"
- checkmerge r1
- checkmerge r2
+ checkmerge "r1" r1
+ checkmerge "r1" r2
where
conflictor = "conflictor"
variantprefix = conflictor ++ ".variant"
- checkmerge d = do
+ checkmerge what d = do
doesDirectoryExist (d </> conflictor) @? (d ++ " conflictor directory missing")
l <- getDirectoryContents d
any (variantprefix `isPrefixOf`) l
- @? (d ++ " conflictor file missing in: " ++ show l )
+ @? (what ++ " conflictor file missing in: " ++ show l )
{- Set up repos as remotes of each other. -}
pair :: TestEnv -> FilePath -> FilePath -> Assertion