fix test
This commit is contained in:
parent
d0e0a565b1
commit
26923b5d64
1 changed files with 6 additions and 10 deletions
16
Test.hs
16
Test.hs
|
@ -364,17 +364,13 @@ test_edit env = "git-annex edit/commit" ~: TestList [t False, t True]
|
||||||
git_annex env "edit" [annexedfile] @? "edit failed"
|
git_annex env "edit" [annexedfile] @? "edit failed"
|
||||||
unannexed annexedfile
|
unannexed annexedfile
|
||||||
changecontent annexedfile
|
changecontent annexedfile
|
||||||
|
boolSystem "git" [Param "add", File annexedfile]
|
||||||
|
@? "git add of edited file failed"
|
||||||
if precommit
|
if precommit
|
||||||
then do
|
then git_annex env "pre-commit" []
|
||||||
-- pre-commit depends on the file being
|
@? "pre-commit failed"
|
||||||
-- staged, normally git commit does this
|
else boolSystem "git" [Params "commit -q -m contentchanged"]
|
||||||
boolSystem "git" [Param "add", File annexedfile]
|
@? "git commit of edited file failed"
|
||||||
@? "git add of edited file failed"
|
|
||||||
git_annex env "pre-commit" []
|
|
||||||
@? "pre-commit failed"
|
|
||||||
else do
|
|
||||||
boolSystem "git" [Params "commit -q -m contentchanged"]
|
|
||||||
@? "git commit of edited file failed"
|
|
||||||
runchecks [checklink, checkunwritable] annexedfile
|
runchecks [checklink, checkunwritable] annexedfile
|
||||||
c <- readFile annexedfile
|
c <- readFile annexedfile
|
||||||
assertEqual "content of modified file" c (changedcontent annexedfile)
|
assertEqual "content of modified file" c (changedcontent annexedfile)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue