augeas 0.3.0 → 0.3.1
raw patch · 2 files changed
+16/−5 lines, 2 files
Files
- HUnitAug.hs +15/−4
- augeas.cabal +1/−1
HUnitAug.hs view
@@ -411,13 +411,24 @@ renameFile (cwd++"/testroot/etc/hosts") (cwd++"/testroot/etc/hosts.orig") renameFile (cwd++"/testroot/etc/hosts.reload") (cwd++"/testroot/etc/hosts")++ contents <- Prelude.readFile (cwd++"/testroot/etc/hosts")++ assertEqual "tesstLoad(1)" (Data.List.isInfixOf "192.168.0.203 testload.haskell-augeas.org" contents) True++ -- Force all of contents to be read, so readFile will really close the file+ Prelude.length contents `seq` Prelude.appendFile (cwd++"/testroot/etc/hosts") "\n$ force mtime update" ret_load <- aug_load aug_ptr- assertEqual "testLoad (1)" success ret_load+ assertEqual "testLoad (2)" success ret_load - -- Verify the new entry was loaded- ret_get <- aug_get aug_ptr (Data.ByteString.Char8.pack "/files/etc/hosts/10/ipaddr")- assertEqual "testLoad (2)" (Right (Just "192.168.0.203")) ret_get+ ret_get <- aug_get aug_ptr (Data.ByteString.Char8.pack "/augeas/error")+ assertEqual "testLoad (3)" (Left no_match) ret_get++ ret_get11 <- aug_get aug_ptr (Data.ByteString.Char8.pack "/files/etc/hosts/4/ipaddr")+ assertEqual "testLoad (4)" (Right (Just "192.168.0.203")) ret_get11++ Prelude.writeFile (cwd++"/testroot/etc/hosts") contents renameFile (cwd++"/testroot/etc/hosts") (cwd++"/testroot/etc/hosts.reload") renameFile (cwd++"/testroot/etc/hosts.orig") (cwd++"/testroot/etc/hosts")
augeas.cabal view
@@ -1,5 +1,5 @@ Name: augeas-Version: 0.3.0+Version: 0.3.1 Synopsis: A Haskell FFI wrapper for the Augeas API Description: A Haskell FFI wrapper for the Augeas API Author: Jude Nagurney