tweet-hs 1.0.0.0 → 1.0.0.1
raw patch · 2 files changed
+15/−4 lines, 2 filesdep +hspec-megaparsecdep ~megaparsecPVP ok
version bump matches the API change (PVP)
Dependencies added: hspec-megaparsec
Dependency ranges changed: megaparsec
API changes (from Hackage documentation)
Files
- test/Spec.hs +12/−3
- tweet-hs.cabal +3/−1
test/Spec.hs view
@@ -2,19 +2,28 @@ import qualified Data.ByteString as BS import Test.Hspec+import Test.Hspec.Megaparsec import Web.Tweet.Parser.FastParser+import Web.Tweet.Parser import Web.Tweet.Sign import Data.Monoid+import Text.Megaparsec import System.Environment import Test.QuickCheck main :: IO () main = hspec $ do- describe "fastParse" $ do+ describe "aeson parser" $ do file <- runIO $ BS.readFile "test/data"- config <- runIO $ (<> "/.cred") <$> getEnv "HOME"- configToml <- runIO $ (<> "/.cred.toml") <$> getEnv "HOME" parallel $ it "parses sample tweets wrong" $ do fastParse "" `shouldBe` Left "Error in $: not enough input"+ describe "handrolled parser" $ do+ file <- runIO $ BS.readFile "test/data"+ parallel $ it "parses sample tweets right" $ do+ parse parseTweet "test suite" `shouldSucceedOn` file+ describe "config parser" $ do+ config <- runIO $ (<> "/.cred") <$> getEnv "HOME"+ configToml <- runIO $ (<> "/.cred.toml") <$> getEnv "HOME" parallel $ it "parses a config file the same way with the toml parser" $ ((==) <$> mkConfigToml configToml <*> mkConfig config) >>= (`shouldBe` True)+
tweet-hs.cabal view
@@ -1,5 +1,5 @@ name: tweet-hs-version: 1.0.0.0+version: 1.0.0.1 synopsis: Command-line tool for twitter description: a Command Line Interface Tweeter homepage: https://github.com/vmchale/command-line-tweeter#readme@@ -120,6 +120,8 @@ , hspec , QuickCheck , bytestring+ , hspec-megaparsec+ , megaparsec if flag(gold) ghc-options: -optl-fuse-ld=gold ld-options: -fuse-ld=gold