diff options
author | Joey Hess <joeyh@joeyh.name> | 2016-07-26 19:15:34 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2016-07-26 19:15:34 -0400 |
commit | bcc5ee4f322a139ee7cef2bae1fc9bea9f5398ca (patch) | |
tree | d4bfd67f6efcb0000c8749aaa6cdae964b333edc /Test.hs | |
parent | e0b3fc906467ded314c75417d5b11b4b04375d1a (diff) |
Removed dependency on json library; all JSON is now handled by aeson.
I've eyeballed all --json commands, and the only difference should be
that some fields are re-ordered.
Diffstat (limited to 'Test.hs')
-rw-r--r-- | Test.hs | 11 |
1 files changed, 6 insertions, 5 deletions
@@ -32,7 +32,8 @@ import Test.Tasty.Ingredients.Rerun import Options.Applicative (switch, long, help) import qualified Data.Map as M -import qualified Text.JSON +import qualified Data.Aeson +import qualified Data.ByteString.Lazy.UTF8 as BU8 import Common @@ -924,10 +925,10 @@ test_merge = intmpclonerepo $ test_info :: Assertion test_info = intmpclonerepo $ do - json <- git_annex_output "info" ["--json"] - case Text.JSON.decodeStrict json :: Text.JSON.Result (Text.JSON.JSObject Text.JSON.JSValue) of - Text.JSON.Ok _ -> return () - Text.JSON.Error e -> assertFailure e + json <- BU8.fromString <$> git_annex_output "info" ["--json"] + case Data.Aeson.eitherDecode json :: Either String Data.Aeson.Value of + Right _ -> return () + Left e -> assertFailure e test_version :: Assertion test_version = intmpclonerepo $ |