Merge remote-tracking branch 'epidemian/issue1829'

This commit is contained in:
Michael Ficarra
2013-03-11 21:47:19 -05:00

View File

@@ -80,3 +80,14 @@ testRepl "evaluates multiline", (input, output) ->
input.emitLine ' 1 + 1'
input.emit 'keypress', null, ctrlV
eq '2', output.lastWrite()
testRepl "variables in scope are preserved", (input, output) ->
input.emitLine 'a = 1'
input.emitLine 'do -> a = 2'
input.emitLine 'a'
eq '2', output.lastWrite()
testRepl "existencial assignment of previously declared variable", (input, output) ->
input.emitLine 'a = null'
input.emitLine 'a ?= 42'
eq '42', output.lastWrite()