diff options
author | Joey Hess <joey@kitenet.net> | 2011-07-10 13:52:53 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2011-07-10 13:52:53 -0400 |
commit | 7919de73af81d1788867ecbcbcc17e25b348ad1d (patch) | |
tree | 9041aaa9c3bfcf083e86b0e77de3ab8da9a8ec1e /test.hs | |
parent | 562fd41d6c7a522d5aa8e8eb65f1c8e12d830df4 (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.hs | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -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 |