💄 fix spec failure caused by win32 path delimiter.

This commit is contained in:
Cheng Zhao 2013-09-05 12:24:08 +08:00
parent 256215b749
commit 8acd6d6c8a

View file

@ -1,5 +1,6 @@
assert = require 'assert'
ipc = require 'ipc'
path = require 'path'
remote = require 'remote'
protocol = remote.require 'protocol'
@ -113,7 +114,8 @@ describe 'protocol API', ->
free()
assert false, 'Got error: ' + errorType + ' ' + error
protocol.interceptProtocol targetScheme, (request) ->
assert.equal request.url, "#{targetScheme}://#{__filename}"
pathInUrl = path.normalize request.url.substr(8)
assert.equal pathInUrl, __filename
it 'can override original protocol handler', (done) ->
handler = remote.createFunctionWithReturnValue 'valar morghulis'