From d554362d0bde00ca4a8349628941a603c62c1901 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 9 Feb 2015 13:41:29 -0400 Subject: [PATCH] add a test case for switching to direct mode and back to indirect --- Test.hs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Test.hs b/Test.hs index 633ef36903..bb70df52a8 100644 --- a/Test.hs +++ b/Test.hs @@ -191,6 +191,7 @@ unitTests note = testGroup ("Unit Tests " ++ note) , testCase "edit (pre-commit)" test_edit_precommit , testCase "partial commit" test_partial_commit , testCase "fix" test_fix + , testCase "direct" test_direct , testCase "trust" test_trust , testCase "fsck (basics)" test_fsck_basic , testCase "fsck (bare)" test_fsck_bare @@ -530,6 +531,14 @@ test_fix = intmpclonerepoInDirect $ do subdir = "s" newfile = subdir ++ "/" ++ annexedfile +test_direct :: Assertion +test_direct = intmpclonerepoInDirect $ do + git_annex "get" [annexedfile] @? "get of file failed" + annexed_present annexedfile + git_annex "direct" [] @? "switch to direct mode failed" + annexed_present annexedfile + git_annex "indirect" [] @? "switch to indirect mode failed" + test_trust :: Assertion test_trust = intmpclonerepo $ do git_annex "trust" [repo] @? "trust failed"