aboutsummaryrefslogtreecommitdiff
path: root/test.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2011-07-10 13:52:53 -0400
committerGravatar Joey Hess <joey@kitenet.net>2011-07-10 13:52:53 -0400
commit7919de73af81d1788867ecbcbcc17e25b348ad1d (patch)
tree9041aaa9c3bfcf083e86b0e77de3ab8da9a8ec1e /test.hs
parent562fd41d6c7a522d5aa8e8eb65f1c8e12d830df4 (diff)
Bugfix: Make add ../ work.
The complication of check-attr returning absolute paths that have to be converted back to relative paths..
Diffstat (limited to 'test.hs')
-rw-r--r--test.hs10
1 files changed, 9 insertions, 1 deletions
diff --git a/test.hs b/test.hs
index 9dad37e0c..51ccc600e 100644
--- a/test.hs
+++ b/test.hs
@@ -108,7 +108,7 @@ test_init = "git-annex init" ~: TestCase $ innewrepo $ do
reponame = "test repo"
test_add :: Test
-test_add = "git-annex add" ~: TestList [basic, sha1dup]
+test_add = "git-annex add" ~: TestList [basic, sha1dup, subdirs]
where
-- this test case runs in the main repo, to set up a basic
-- annexed file that later tests will use
@@ -129,6 +129,14 @@ test_add = "git-annex add" ~: TestList [basic, sha1dup]
git_annex "add" ["-q", sha1annexedfiledup, "--backend=SHA1"] @? "add of second file with same SHA1 failed"
annexed_present sha1annexedfiledup
annexed_present sha1annexedfile
+ subdirs = TestCase $ intmpclonerepo $ do
+ createDirectory "dir"
+ writeFile "dir/foo" $ content annexedfile
+ git_annex "add" ["-q", "dir"] @? "add of subdir failed"
+ createDirectory "dir2"
+ writeFile "dir2/foo" $ content annexedfile
+ changeWorkingDirectory "dir"
+ git_annex "add" ["-q", "../dir2"] @? "add of ../subdir failed"
test_setkey :: Test
test_setkey = "git-annex setkey/fromkey" ~: TestCase $ inmainrepo $ do