packages feed

yaml 0.8.18.6 → 0.8.18.7

raw patch · 4 files changed

+20/−2 lines, 4 filesdep +temporaryPVP ok

version bump matches the API change (PVP)

Dependencies added: temporary

API changes (from Hackage documentation)

Files

ChangeLog.md view
@@ -1,3 +1,7 @@+## 0.8.18.7++* Add `O_TRUNC` when opening files+ ## 0.8.18.6  * s/fdopen/_fdopen on Windows [#96](https://github.com/snoyberg/yaml/issues/96)
Text/Libyaml.hs view
@@ -511,7 +511,7 @@ -- XXX copied from GHC.IO.FD std_flags, read_flags, output_flags, write_flags :: CInt std_flags    = Posix.o_NOCTTY-output_flags = std_flags    .|. Posix.o_CREAT+output_flags = std_flags    .|. Posix.o_CREAT .|. Posix.o_TRUNC read_flags   = std_flags    .|. Posix.o_RDONLY write_flags  = output_flags .|. Posix.o_WRONLY 
test/Data/YamlSpec.hs view
@@ -34,6 +34,8 @@ import qualified Data.Vector as V import Data.HashMap.Strict (HashMap) import qualified Data.HashMap.Strict as HM+import System.IO (hClose)+import System.IO.Temp (withSystemTempFile)  data TestJSON = TestJSON               { string :: Text@@ -152,7 +154,9 @@      it "preserves Scientific precision" casePreservesScientificPrecision +    it "truncates files" caseTruncatesFiles + specialStrings :: [T.Text] specialStrings =     [ "fo\"o"@@ -502,3 +506,12 @@     -- results, because of <https://github.com/bos/text/issues/34>.     D.decodeEither "x: 9.78159610558926e-5" @?= Right (object         [ "x" .= D.Number (read "9.78159610558926e-5") ])++caseTruncatesFiles :: Assertion+caseTruncatesFiles = withSystemTempFile "truncate.yaml" $ \fp h -> do+    replicateM_ 500 $ B8.hPut h "HELLO WORLD!!!!!\n"+    hClose h+    let val = object ["hello" .= ("world" :: String)]+    D.encodeFile fp val+    res <- D.decodeFileEither fp+    either (Left . show) Right res `shouldBe` Right val
yaml.cabal view
@@ -1,5 +1,5 @@ name:            yaml-version:         0.8.18.6+version:         0.8.18.7 license:         BSD3 license-file:    LICENSE author:          Michael Snoyman <michael@snoyman.com>, Anton Ageev <antage@gmail.com>,Kirill Simonov@@ -139,6 +139,7 @@                    , aeson-qq                    , mockery                    , base-compat+                   , temporary     ghc-options:     -Wall  executable examples