Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Could we have multiline expectations? #419

Open
philderbeast opened this issue Feb 15, 2024 · 1 comment
Open

Could we have multiline expectations? #419

philderbeast opened this issue Feb 15, 2024 · 1 comment

Comments

@philderbeast
Copy link

Could we have multiline expectations (when GHC gets multiline strings ghc-proposals/ghc-proposals#569)?

-- >>> render . docProjectConfigPath $ ProjectConfigPath $ "D.config" :| ["C.config", "B.config", "A.project" ]
-- "D.config\n  imported by: C.config\n  imported by: B.config\n  imported by: A.project"

This would then become something like;

-- >>> render . docProjectConfigPath $ ProjectConfigPath $ "D.config" :| ["C.config", "B.config", "A.project" ]
-- """
-- D.config
--  imported by: C.config
--  imported by: B.config
--  imported by: A.project
-- """

The snippet is taken from haskell/cabal#9578.

@sol
Copy link
Owner

sol commented May 21, 2024

@philderbeast with GHC 9.10.1 out, can this output be produced by GHCi? If yes, then I think it should already work, if no then it may be out-of-scope for doctest. doctest is a tool to verify that example GHCi sessions work. It's a documentation tool, not primarily a testing tool. Hspec is a better option for testing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants