* testing/lisp/test-ob-haskell-ghci.el: Test output without EOL

(ob-haskell/output-without-eol-1):
(ob-haskell/output-without-eol-2):
(ob-haskell/output-without-eol-3): New tests.
This commit is contained in:
Bruno BARBIER 2023-04-29 10:27:57 +02:00 committed by Ihor Radchenko
parent 36a786f7f9
commit 3674e40247
No known key found for this signature in database
GPG Key ID: 6470762A7DA11D8B
1 changed files with 32 additions and 0 deletions

View File

@ -173,6 +173,38 @@ return \"useless\"
"Evaluation of strings."
(should (equal "a string" (test-ob-haskell-ghci "" "\"a string\""))))
;;;; Output without EOL
;;
(ert-deftest ob-haskell/output-without-eol-1 ()
"Cannot get output from incomplete lines, when entered line by line."
:expected-result :failed
(should (equal "123"
(test-ob-haskell-ghci ":results output" "
putStr(\"1\")
putStr(\"2\")
putStr(\"3\")
putStr(\"\\n\")
"))))
(ert-deftest ob-haskell/output-without-eol-2 ()
"Incomplete output lines are OK when using a multiline block."
(should (equal "123"
(test-ob-haskell-ghci ":results output" "
:{
do putStr(\"1\")
putStr(\"2\")
putStr(\"3\")
putStr(\"\\n\")
:}
"))))
(ert-deftest ob-haskell/output-without-eol-3 ()
"Incomplete output lines are OK on one line."
(should (equal "123"
(test-ob-haskell-ghci ":results output" "
do { putStr(\"1\"); putStr(\"2\"); putStr(\"3\"); putStr(\"\\n\") }
"))))
;;;; Local variables
(ert-deftest ob-haskell/let-one-line ()