summaryrefslogtreecommitdiff
path: root/Test.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2015-01-02 13:59:25 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2015-01-02 13:59:25 -0400
commitb3eaa4108f0f4e0df8c1642c4c65b6f9ef7f4bce (patch)
treecf8b72f70fbda21a35d6e588cef83659a7f50edf /Test.hs
parentfda16b5c04db57bbd040116fb7696a1dd40228a0 (diff)
Diffstat (limited to 'Test.hs')
-rw-r--r--Test.hs6
1 files changed, 6 insertions, 0 deletions
diff --git a/Test.hs b/Test.hs
index b8d0f89a6..684da0d75 100644
--- a/Test.hs
+++ b/Test.hs
@@ -450,6 +450,12 @@ test_lock = intmpclonerepoInDirect $ do
not <$> git_annex "unlock" [annexedfile] @? "unlock failed to fail with not present file"
annexed_notpresent annexedfile
+ -- regression test: unlock of newly added, not committed file
+ -- should fail
+ writeFile "newfile" "foo"
+ git_annex "add" ["newfile"] @? "add new file failed"
+ not <$> git_annex "unlock" ["newfile"] @? "unlock failed to fail on newly added, never committed file"
+
git_annex "get" [annexedfile] @? "get of file failed"
annexed_present annexedfile
git_annex "unlock" [annexedfile] @? "unlock failed"