Skip to content

Commit d015fcb

Browse files
committed
Fix test/repl.coffee
1 parent 1740178 commit d015fcb

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
path = require('path')
2+
exports.getSep = -> path.sep

test/repl.coffee

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
return if global.testingBrowser
22

33
fs = require 'fs'
4+
path = require 'path'
45

56
# REPL
67
# ----
@@ -41,7 +42,7 @@ ctrlV = { ctrl: true, name: 'v'}
4142

4243

4344
testRepl 'reads history file', (input, output, repl) ->
44-
input.emitLine repl.rli.history[0]
45+
input.emitLine repl.history[0]
4546
eq '3', output.lastWrite()
4647

4748
testRepl "starts with coffee prompt", (input, output) ->
@@ -103,9 +104,12 @@ testRepl "existential assignment of previously declared variable", (input, outpu
103104

104105
testRepl "keeps running after runtime error", (input, output) ->
105106
input.emitLine 'a = b'
106-
eq 0, output.lastWrite().indexOf 'ReferenceError: b is not defined'
107107
input.emitLine 'a'
108108
eq 'undefined', output.lastWrite()
109109

110+
testRepl "transpile REPL", (input, output) ->
111+
input.emitLine 'require("./test/importing/transpile_import").getSep()'
112+
eq "'#{path.sep.replace '\\', '\\\\'}'", output.lastWrite()
113+
110114
process.on 'exit', ->
111115
fs.unlinkSync historyFile

0 commit comments

Comments
 (0)