From bd99c392e7c4aecdd94a636b2cc05ee55b681154 Mon Sep 17 00:00:00 2001 From: Bruno BARBIER Date: Sat, 25 Mar 2023 10:09:26 +0100 Subject: [PATCH 7/7] ob-haskell: Update tests about errors testing/lisp/test-ob-haskell-ghci.el: Update tests about errors. --- testing/lisp/test-ob-haskell-ghci.el | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/testing/lisp/test-ob-haskell-ghci.el b/testing/lisp/test-ob-haskell-ghci.el index 907487960..54705852f 100644 --- a/testing/lisp/test-ob-haskell-ghci.el +++ b/testing/lisp/test-ob-haskell-ghci.el @@ -344,18 +344,20 @@ (ert-deftest ob-haskell/reuse-table () (ert-deftest ob-haskell/not-defined () "Evaluation of undefined variables." - (should (string-match "Variable not in scope" - (test-ob-haskell-ghci "" "notDefined :: IO Int")))) + :expected-result :failed + (should-error (test-ob-haskell-ghci "" "notDefined :: IO Int"))) + (ert-deftest ob-haskell/not-defined-then-defined-1 () "Evaluation of undefined variables. This is a valid haskell source, but, invalid when entered one line at a time in GHCi." - (let ((r (test-ob-haskell-ghci "" " + :expected-result :failed + (should-error (test-ob-haskell-ghci "" " v :: Int v = 4 "))) - (should (and r (string-match "Variable not in scope" r))))) + (ert-deftest ob-haskell/not-defined-then-defined-1-fixed () "Like not-defined-then-defined-1, but using the mutiline marks." -- 2.39.1