Skip to content

Commit

Permalink
Add failing empty continuation test
Browse files Browse the repository at this point in the history
  • Loading branch information
noughtmare committed Jun 16, 2023
1 parent 9e1c8dd commit 6ac8d5b
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion tests/test.hs
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,12 @@ ndots = number 10 >>= go where
go 0 = pure ()
go n = char '.' *> go (n - 1)


tests :: TestTree
tests = testGroup "Tests" [unitTests]

emptyk :: Parser ()
emptyk = 'emptyk ::= emptyk <|> pure ()

unitTests :: TestTree
unitTests = testGroup "Unit tests"
[ testCase "base 2 number positive" $
Expand Down Expand Up @@ -86,4 +88,7 @@ unitTests = testGroup "Unit tests"
, "3....."
, "10"
]
, localOption (Timeout 1000000 "1s") $
testCase "emptyk positive" $
parse emptyk "" @?= [()]
]

0 comments on commit 6ac8d5b

Please sign in to comment.