add test cases for git/annexed conversions
Make sure that tip keeps working. I tried to go futher and touch the file and make sure it stayed what it was converted to, but struggled with some weird and not entirely reproducable behavior, so kept the tests simple for now.
This commit is contained in:
parent
675556fd9a
commit
8e756a6ec0
2 changed files with 34 additions and 0 deletions
|
@ -415,6 +415,16 @@ annexed_notpresent_imported f = ifM (annexeval Config.crippledFileSystem)
|
|||
unannexed :: FilePath -> Assertion
|
||||
unannexed = runchecks [checkregularfile, checkcontent, checkwritable]
|
||||
|
||||
-- Check that a file is unannexed, but also that what's recorded in git
|
||||
-- is not an annexed file.
|
||||
unannexed_in_git :: FilePath -> Assertion
|
||||
unannexed_in_git f = do
|
||||
unannexed f
|
||||
r <- annexeval $ Annex.WorkTree.lookupKey (toRawFilePath f)
|
||||
case r of
|
||||
Just _k -> assertFailure $ f ++ " is annexed in git"
|
||||
Nothing -> return ()
|
||||
|
||||
add_annex :: FilePath -> String -> Assertion
|
||||
add_annex f faildesc = ifM (unlockedFiles <$> getTestMode)
|
||||
( git "add" [f] faildesc
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue