Open
Description
Either that, or I'm just getting it completely wrong.
I fill out the getChar
koan, then the prompt asks me for "a", which I give it, but then it fails immediately even once I've filled out the getLine
koan. I assume that once the first is passing, it should be prompting me to enter "burrito", but instead it just fails.
testReadingChar :: Spec
testReadingChar = it "getChar" $ do
putStrLn "Write: \"a\" to pass this test: "
-- NOTE: replace 'failIO' with the actual function
result <- getChar
assertEqual ""
'a'
result
testReadingLine :: Spec
testReadingLine = it "getLine" $ do
-- NOTE: replace 'failIO' with the actual function
result <- getLine
assertEqual "Write: \"burrito\" to pass this test"
"burrito"
result
That's my solution, the output from the console is:
BasicIO
Write: "a" to pass this test:
a
- getChar
- getLine FAILED [1]
1) BasicIO getLine
Write: "burrito" to pass this test
expected: "burrito"
but got: ""
Metadata
Metadata
Assignees
Labels
No labels