REPL tests based on direct interaction with input and output stream. Includes multiline tests.

This commit is contained in:
Alon Salant
2013-01-21 10:02:04 -08:00
parent 537c5f4b70
commit 47bd05e9a0
4 changed files with 74 additions and 37 deletions

View File

@@ -54,7 +54,7 @@ addMultilineHandler = (repl) ->
rli.prompt true
return
# no-op unless the current line is empty
return unless rli.line.match /^\s*$/
return unless not rli.line? or rli.line.match /^\s*$/
# eval, print, loop
multiline.enabled = not multiline.enabled
rli.line = ''