diff options
| author | Joey Hess <joeyh@joeyh.name> | 2015-10-21 19:47:15 -0400 |
|---|---|---|
| committer | Joey Hess <joeyh@joeyh.name> | 2015-10-21 19:47:15 -0400 |
| commit | eac925f398df39791fe8236f8f8329627761f2e9 (patch) | |
| tree | 9ce53fbad65c36bb39b5102e6792219b43c34d2a /src/Propellor/Property/File.hs | |
| parent | 2d1671d5ebdd3c7f99d4023ac621137938505962 (diff) | |
| parent | 85f08ee913a77c16ba4d264581b1240468c4ebb2 (diff) | |
Merge branch 'joeyconfig'
Diffstat (limited to 'src/Propellor/Property/File.hs')
| -rw-r--r-- | src/Propellor/Property/File.hs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/Propellor/Property/File.hs b/src/Propellor/Property/File.hs index 08fdc780..7e421cb7 100644 --- a/src/Propellor/Property/File.hs +++ b/src/Propellor/Property/File.hs @@ -67,6 +67,9 @@ f `containsLines` ls = fileProperty (f ++ " contains:" ++ show ls) go f lacksLine :: FilePath -> Line -> Property NoInfo f `lacksLine` l = fileProperty (f ++ " remove: " ++ l) (filter (/= l)) f +lacksLines :: FilePath -> [Line] -> Property NoInfo +f `lacksLines` ls = fileProperty (f ++ " remove: " ++ show [ls]) (filter (`notElem` ls)) f + -- | Removes a file. Does not remove symlinks or non-plain-files. notPresent :: FilePath -> Property NoInfo notPresent f = check (doesFileExist f) $ property (f ++ " not present") $ |
