summaryrefslogtreecommitdiff
path: root/Test.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2015-02-09 13:41:29 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2015-02-09 13:41:29 -0400
commitc844b1049cafbc62ff72de98760a96d4cef4c933 (patch)
tree01417ebb452ea9936bd60cd6a2948e3200ce218a /Test.hs
parentb7f90512e820654f3b60085640387f3f37ceaadf (diff)
add a test case for switching to direct mode and back to indirect
Diffstat (limited to 'Test.hs')
-rw-r--r--Test.hs9
1 files changed, 9 insertions, 0 deletions
diff --git a/Test.hs b/Test.hs
index 633ef3690..bb70df52a 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"