mirror of
https://github.com/IHaskell/IHaskell.git
synced 2025-04-15 19:06:06 +00:00
Add tests for :sprint
This commit is contained in:
parent
c1395da62e
commit
dfccbc6977
@ -741,6 +741,7 @@ evalCommand _ (Directive GetHelp _) state = do
|
||||
, " :option <opt> - Set an option."
|
||||
, " :option no-<opt> - Unset an option."
|
||||
, " :?, :help - Show this help text."
|
||||
, " :sprint <value> - Print a value without forcing evaluation."
|
||||
, ""
|
||||
, "Any prefix of the commands will also suffice, e.g. use :ty for :type."
|
||||
, ""
|
||||
|
@ -169,6 +169,10 @@ testEval =
|
||||
#endif
|
||||
":k Maybe" `becomes` ["Maybe :: * -> *"]
|
||||
":in String" `pages` ["type String = [Char] \t-- Defined in \8216GHC.Base\8217"]
|
||||
[hereLit|
|
||||
let x = ['a'..'z']
|
||||
:sprint x
|
||||
|] `becomes` ["x = _"]
|
||||
|
||||
it "captures stderr" $ do
|
||||
[hereLit|
|
||||
|
@ -964,11 +964,12 @@
|
||||
" :type <expression> - Print expression type.\n",
|
||||
" :info <name> - Print all info for a name.\n",
|
||||
" :hoogle <query> - Search for a query on Hoogle.\n",
|
||||
" :doc <ident> - Get documentation for an identifier via Hogole.\n",
|
||||
" :doc <ident> - Get documentation for an identifier via Hoogle.\n",
|
||||
" :set -XFlag -Wall - Set an option (like ghci).\n",
|
||||
" :option <opt> - Set an option.\n",
|
||||
" :option no-<opt> - Unset an option.\n",
|
||||
" :?, :help - Show this help text.\n",
|
||||
" :sprint <value> - Print a value without forcing evaluation.\n",
|
||||
"\n",
|
||||
"Any prefix of the commands will also suffice, e.g. use :ty for :type.\n",
|
||||
"\n",
|
||||
|
Loading…
x
Reference in New Issue
Block a user