summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2015-10-06 17:35:29 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2015-10-06 17:35:29 -0400
commit64d01c8b7d7c400b0c948e62a01baa82eadebc5b (patch)
treef4444f9e192a18a91b577da84b93900c248e1567
parent4233e81ef174d7891a8134656a67a6d40ea09ef9 (diff)
add test cases for copy --auto
(Only --from for now, should add --to sometime but I'm on low sleep so this is the mininal test to catch the reversion just fixed, bad me for doing it backwards and incompletely.)
-rw-r--r--Test.hs11
1 files changed, 9 insertions, 2 deletions
diff --git a/Test.hs b/Test.hs
index 9dd5edd37..44bede86a 100644
--- a/Test.hs
+++ b/Test.hs
@@ -487,15 +487,20 @@ test_copy = intmpclonerepo $ do
test_preferred_content :: Assertion
test_preferred_content = intmpclonerepo $ do
annexed_notpresent annexedfile
- -- get --auto only looks at numcopies when preferred content is not
+ -- get/copy --auto looks only at numcopies when preferred content is not
-- set, and with 1 copy existing, does not get the file.
git_annex "get" ["--auto", annexedfile] @? "get --auto of file failed with default preferred content"
annexed_notpresent annexedfile
+ git_annex "copy" ["--from", "origin", "--auto", annexedfile] @? "copy --auto --from of file failed with default preferred content"
+ annexed_notpresent annexedfile
git_annex "wanted" [".", "standard"] @? "set expression to standard failed"
git_annex "group" [".", "client"] @? "set group to standard failed"
git_annex "get" ["--auto", annexedfile] @? "get --auto of file failed for client"
annexed_present annexedfile
+ git_annex "drop" [annexedfile] @? "drop of file failed"
+ git_annex "copy" ["--from", "origin", "--auto", annexedfile] @? "copy --auto --from of file failed for client"
+ annexed_present annexedfile
git_annex "ungroup" [".", "client"] @? "ungroup failed"
git_annex "wanted" [".", "standard"] @? "set expression to standard failed"
@@ -505,9 +510,11 @@ test_preferred_content = intmpclonerepo $ do
annexed_present annexedfile
git_annex "drop" [annexedfile] @? "drop of file failed"
annexed_notpresent annexedfile
- -- get --auto with manual does not get the file
+ -- copy/get --auto with manual does not get the file
git_annex "get" ["--auto", annexedfile] @? "get --auto of file failed with manual preferred content"
annexed_notpresent annexedfile
+ git_annex "copy" ["--from", "origin", "--auto", annexedfile] @? "copy --auto --from of file failed with manual preferred content"
+ annexed_notpresent annexedfile
git_annex "ungroup" [".", "client"] @? "ungroup failed"
git_annex "wanted" [".", "exclude=*"] @? "set expression to exclude=* failed"