Allow multiline expressions
This commit is contained in:
10
test/Spec.hs
10
test/Spec.hs
@ -71,9 +71,9 @@ lexerTests = testGroup "Lexer Tests"
|
||||
parserTests :: TestTree
|
||||
parserTests = testGroup "Parser Tests"
|
||||
[ testCase "Error when assigning a value to T" $ do
|
||||
let input = lexTricu "t = x"
|
||||
case (runParser parseExpression "" input) of
|
||||
Left _ -> return ()
|
||||
let tokens = lexTricu "t = x"
|
||||
case parseSingleExpr tokens of
|
||||
Left _ -> return ()
|
||||
Right _ -> assertFailure "Expected failure when trying to assign the value of T"
|
||||
, testCase "Parse function definitions" $ do
|
||||
let input = "x = (\\a b c : a)"
|
||||
@ -149,10 +149,6 @@ parserTests = testGroup "Parser Tests"
|
||||
let input = "(t) -- (t) -- (t)"
|
||||
expect = [TLeaf]
|
||||
parseTricu input @?= expect
|
||||
, testCase "Comments with no terms" $ do
|
||||
let input = unlines ["-- (t)", "(t t)"]
|
||||
expect = [SEmpty,SApp TLeaf TLeaf]
|
||||
parseTricu input @?= expect
|
||||
]
|
||||
|
||||
evaluationTests :: TestTree
|
||||
|
Reference in New Issue
Block a user