Skip to content

Commit

Permalink
update test for #1765, #1766
Browse files Browse the repository at this point in the history
  • Loading branch information
Simon Marlow committed Nov 7, 2007
1 parent 58e8f7a commit 89bc82e
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
11 changes: 8 additions & 3 deletions tests/ghc-regress/ghci/scripts/ghci005.script
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
:unset +s +t
-- tests for :def, :undef
:def
let void m = m >> return ""
let echo s = void (putStrLn s)
:def echo echo
:def
:echo hello, world!

let echo s = return (":! echo " ++ map Char.toUpper s)
let echoupper s = return (":! echo " ++ map Char.toUpper s)
:echo hello, world!
:def echo echo
:def echo echoupper
:undef echo
:def echo echo
:def echo echoupper
:echo hello, world!
:def! echo echo
:echo hello, world!
:undef f f
7 changes: 6 additions & 1 deletion tests/ghc-regress/ghci/scripts/ghci005.stdout
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
no macros defined
the following macros are defined:
echo
hello, world!
hello, world!
command 'echo' is already defined
macro 'echo' is already defined
HELLO, WORLD!
hello, world!
macro 'f' is not defined

0 comments on commit 89bc82e

Please sign in to comment.