From 3295295f59e46e97205a36c6541182120d750a98 Mon Sep 17 00:00:00 2001 From: Bruno BARBIER Date: Sat, 29 Apr 2023 10:27:57 +0200 Subject: [PATCH 7/7] * 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. --- testing/lisp/test-ob-haskell-ghci.el | 32 ++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/testing/lisp/test-ob-haskell-ghci.el b/testing/lisp/test-ob-haskell-ghci.el index adc9f939c..212e0cb6f 100644 --- a/testing/lisp/test-ob-haskell-ghci.el +++ b/testing/lisp/test-ob-haskell-ghci.el @@ -171,6 +171,38 @@ (ert-deftest ob-haskell/eval-strings () "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 () -- 2.39.3