mirror of
https://github.com/jashkenas/coffeescript.git
synced 2026-05-03 03:00:14 -04:00
Merge remote-tracking branch 'epidemian/issue1829'
This commit is contained in:
@@ -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()
|
||||
Reference in New Issue
Block a user