on master help sign in
Add failing test for number+string
d4cafeeMichael Snoyman
test/json.yaml+1
@@ -6,3 +6,4 @@ anArray:
6hash:
6hash:
7 key1: value1
7 key1: value1
8 key2: value2
8 key2: value2
9+extrastring: 1234-foo
test/main.hs+2
@@ -34,6 +34,7 @@ data TestJSON = TestJSON
34 , number :: Int
34 , number :: Int
35 , anArray :: Vector Text
35 , anArray :: Vector Text
36 , hash :: HashMap Text Text
36 , hash :: HashMap Text Text
37+ , extrastring :: Text
37 } deriving (Show, Eq)
38 } deriving (Show, Eq)
38
39
39deriveJSON defaultOptions ''TestJSON
40deriveJSON defaultOptions ''TestJSON
@@ -119,6 +120,7 @@ main = hspec $ do
119 , number = 2
120 , number = 2
120 , anArray = V.fromList ["a", "b"]
121 , anArray = V.fromList ["a", "b"]
121 , hash = HM.fromList [("key1", "value1"), ("key2", "value2")]
122 , hash = HM.fromList [("key1", "value1"), ("key2", "value2")]
123+ , extrastring = "1234-foo"
122 }
124 }
123
125
124 describe "round-tripping of special scalars" $ do
126 describe "round-tripping of special scalars" $ do