[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] Add tests for ob-haskell (GHCi)
From: |
Ihor Radchenko |
Subject: |
Re: [PATCH] Add tests for ob-haskell (GHCi) |
Date: |
Thu, 23 Mar 2023 10:35:55 +0000 |
Bruno Barbier <brubar.cs@gmail.com> writes:
> +(ert-deftest ob-haskell/let-multilines-1 ()
> + "Local definitions on multiple lines."
> + :expected-result :failed
> + (should (equal 6 (test-ob-haskell-ghci "" "
> +:{
> + let { x=2
> + ; y=3
> + }
> + in x*y
> +:}
> +"))))
Part of the problem is that haskell-mode appears to use non-standard
prompt:
comint-prompt-regexp: ^[[:alnum:].*_() |λ]*> \|^λ?>
Output: ghci| ghci| ghci| ghci| ghci| 6
Note "|".
We may want to either report this upstream or modify
`org-babel-interpret-haskell' further where it extends
`comint-prompt-regexp'.
> +(ert-deftest ob-haskell/ghci-info ()
> + "The ghci meta command ':info' ."
> + (should (equal "repeat :: a -> [a] -- Defined in ‘GHC.List’"
> + (test-ob-haskell-ghci ":results output" ":info repeat"))))
On my system, the output contains different number of spaces in
"[a]<spaces>-- ". It appears to be system-dependent. Looks like test's
fault.
--
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>
- [PATCH] Add tests for ob-haskell (GHCi), Bruno Barbier, 2023/03/19
- Re: [PATCH] Add tests for ob-haskell (GHCi), Ihor Radchenko, 2023/03/19
- Re: [PATCH] Add tests for ob-haskell (GHCi), Ihor Radchenko, 2023/03/19
- Re: [PATCH] Add tests for ob-haskell (GHCi), Bruno Barbier, 2023/03/19
- Re: [PATCH] Add tests for ob-haskell (GHCi), Ihor Radchenko, 2023/03/22
- Re: [PATCH] Add tests for ob-haskell (GHCi), Ihor Radchenko, 2023/03/24
- Re: [PATCH] Add tests for ob-haskell (GHCi), Bruno Barbier, 2023/03/25
- Re: [PATCH] Add tests for ob-haskell (GHCi), Ihor Radchenko, 2023/03/26
- Re: [PATCH] Add tests for ob-haskell (GHCi), Bruno Barbier, 2023/03/26
- Re: [PATCH] Add tests for ob-haskell (GHCi), Ihor Radchenko, 2023/03/26
- Re: [PATCH] Add tests for ob-haskell (GHCi),
Ihor Radchenko <=