Safe Haskell | None |
---|---|
Language | Haskell98 |
- type Line = String
- hasContent :: FilePath -> [Line] -> Property NoInfo
- hasPrivContent :: IsContext c => FilePath -> c -> Property HasInfo
- hasPrivContentFrom :: (IsContext c, IsPrivDataSource s) => s -> FilePath -> c -> Property HasInfo
- hasPrivContentExposed :: IsContext c => FilePath -> c -> Property HasInfo
- hasPrivContentExposedFrom :: (IsContext c, IsPrivDataSource s) => s -> FilePath -> c -> Property HasInfo
- hasPrivContent' :: (IsContext c, IsPrivDataSource s) => (FilePath -> String -> IO ()) -> s -> FilePath -> c -> Property HasInfo
- containsLine :: FilePath -> Line -> Property NoInfo
- containsLines :: FilePath -> [Line] -> Property NoInfo
- lacksLine :: FilePath -> Line -> Property NoInfo
- notPresent :: FilePath -> Property NoInfo
- fileProperty :: Desc -> ([Line] -> [Line]) -> FilePath -> Property NoInfo
- fileProperty' :: (FilePath -> String -> IO ()) -> Desc -> ([Line] -> [Line]) -> FilePath -> Property NoInfo
- dirExists :: FilePath -> Property NoInfo
- ownerGroup :: FilePath -> User -> Group -> Property NoInfo
- mode :: FilePath -> FileMode -> Property NoInfo
Documentation
hasPrivContent :: IsContext c => FilePath -> c -> Property HasInfo 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.
hasPrivContentFrom :: (IsContext c, IsPrivDataSource s) => s -> FilePath -> c -> Property HasInfo Source
Like hasPrivContent, but allows specifying a source for PrivData, rather than using PrivDataSourceFile .
hasPrivContentExposed :: IsContext c => FilePath -> c -> Property HasInfo Source
Leaves the file at its default or current mode, allowing "private" data to be read.
Use with caution!
hasPrivContentExposedFrom :: (IsContext c, IsPrivDataSource s) => s -> FilePath -> c -> Property HasInfo Source
hasPrivContent' :: (IsContext c, IsPrivDataSource s) => (FilePath -> String -> IO ()) -> s -> FilePath -> c -> Property HasInfo Source
containsLine :: FilePath -> Line -> Property NoInfo Source
Ensures that a line is present in a file, adding it to the end if not.
lacksLine :: FilePath -> Line -> Property NoInfo 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 NoInfo Source
Removes a file. Does not remove symlinks or non-plain-files.
fileProperty' :: (FilePath -> String -> IO ()) -> Desc -> ([Line] -> [Line]) -> FilePath -> Property NoInfo Source