From 6a6aa61b54966544987063df9337dc9d2ff058a5 Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Tue, 31 Jan 2017 19:58:49 -0700 Subject: document File.containsLines --- src/Propellor/Property/File.hs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/Propellor/Property/File.hs b/src/Propellor/Property/File.hs index 95fc6f81..b6f1a8d6 100644 --- a/src/Propellor/Property/File.hs +++ b/src/Propellor/Property/File.hs @@ -21,6 +21,12 @@ f `hasContent` newcontent = fileProperty containsLine :: FilePath -> Line -> Property UnixLike f `containsLine` l = f `containsLines` [l] +-- | Ensures that a list of lines are present in a file, adding any that are not +-- to the end of the file. +-- +-- Note that this property does not guarantee that the lines will appear +-- consecutively, nor in the order specified. If you need either of these, use +-- 'File.containsBlock'. containsLines :: FilePath -> [Line] -> Property UnixLike f `containsLines` ls = fileProperty (f ++ " contains:" ++ show ls) go f where -- cgit v1.2.3