summaryrefslogtreecommitdiff
path: root/test.hs
diff options
context:
space:
mode:
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 4d751a707..bd2e1e46c 100644
--- a/test.hs
+++ b/test.hs
@@ -93,6 +93,7 @@ blackbox = TestLabel "blackbox" $ TestList
, test_unannex
, test_drop
, test_get
+ , test_optimize
, test_move
, test_copy
, test_lock
@@ -216,6 +217,17 @@ test_get = "git-annex get" ~: TestCase $ intmpclonerepo $ do
inmainrepo $ unannexed ingitfile
unannexed ingitfile
+test_optimize :: Test
+test_optimize = "git-annex optimize" ~: TestCase $ intmpclonerepo $ do
+ inmainrepo $ annexed_present annexedfile
+ annexed_notpresent annexedfile
+ git_annex "optimize" ["-q", annexedfile, "--numcopies=2"] @? "optimize of file failed"
+ inmainrepo $ annexed_present annexedfile
+ annexed_present annexedfile
+ git_annex "optimize" ["-q", annexedfile] @? "optimize of file failed"
+ inmainrepo $ annexed_present annexedfile
+ annexed_notpresent annexedfile
+
test_move :: Test
test_move = "git-annex move" ~: TestCase $ intmpclonerepo $ do
annexed_notpresent annexedfile