Safe Haskell | None |
---|---|
Language | Haskell98 |
- type Line = String
- hasContent :: FilePath -> [Line] -> Property
- hasPrivContent :: IsContext c => FilePath -> c -> Property
- hasPrivContentExposed :: IsContext c => FilePath -> c -> Property
- hasPrivContent' :: IsContext c => (String -> FilePath -> IO ()) -> FilePath -> c -> Property
- containsLine :: FilePath -> Line -> Property
- containsLines :: FilePath -> [Line] -> Property
- lacksLine :: FilePath -> Line -> Property
- notPresent :: FilePath -> Property
- fileProperty :: Desc -> ([Line] -> [Line]) -> FilePath -> Property
- fileProperty' :: (FilePath -> String -> IO ()) -> Desc -> ([Line] -> [Line]) -> FilePath -> Property
- dirExists :: FilePath -> Property
- ownerGroup :: FilePath -> UserName -> GroupName -> Property
- mode :: FilePath -> FileMode -> Property
Documentation
hasContent :: FilePath -> [Line] -> Property Source
Replaces all the content of a file.
hasPrivContent :: IsContext c => FilePath -> c -> Property Source
Ensures a file has contents that comes from PrivData.
The file's permissions are preserved if the file already existed. Otherwise, they're set to 600.
hasPrivContentExposed :: IsContext c => FilePath -> c -> Property Source
Leaves the file at its default or current mode, allowing "private" data to be read.
Use with caution!
containsLine :: FilePath -> Line -> Property Source
Ensures that a line is present in a file, adding it to the end if not.
containsLines :: FilePath -> [Line] -> Property Source
lacksLine :: FilePath -> Line -> Property Source
Ensures that a line is not present in a file. Note that the file is ensured to exist, so if it doesn't, an empty file will be written.
notPresent :: FilePath -> Property Source
Removes a file. Does not remove symlinks or non-plain-files.
fileProperty' :: (FilePath -> String -> IO ()) -> Desc -> ([Line] -> [Line]) -> FilePath -> Property Source