Add tests for :sprint

This commit is contained in:
Vaibhav Sagar 2020-01-28 23:24:35 -05:00
parent c1395da62e
commit dfccbc6977
3 changed files with 7 additions and 1 deletions

View File

@ -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."
, ""

View File

@ -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|

View File

@ -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",