aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames McCoy <jamessan@jamessan.com>2017-02-23 01:24:55 -0500
committerJames McCoy <jamessan@jamessan.com>2017-02-23 01:24:55 -0500
commitd4dd447ded5e0818fe3e49ebbe59fdafdaae7a1b (patch)
treef0b7b4ae6b1fa7b14c06d8b86b4d1d56141135ce
parentbc76ce2c4f26a1ceabc8ba7dc8d5ff3378648a40 (diff)
downloadrneovim-d4dd447ded5e0818fe3e49ebbe59fdafdaae7a1b.tar.gz
rneovim-d4dd447ded5e0818fe3e49ebbe59fdafdaae7a1b.tar.bz2
rneovim-d4dd447ded5e0818fe3e49ebbe59fdafdaae7a1b.zip
win: test: Fix closure jobs test on Windows
-rw-r--r--test/functional/core/job_spec.lua22
1 files changed, 11 insertions, 11 deletions
diff --git a/test/functional/core/job_spec.lua b/test/functional/core/job_spec.lua
index b15af6b9ee..b551adb8db 100644
--- a/test/functional/core/job_spec.lua
+++ b/test/functional/core/job_spec.lua
@@ -393,23 +393,23 @@ describe('jobs', function()
it('jobstart() works with closures', function()
source([[
- fun! MkFun()
- let a1 = 'foo'
- let a2 = 'bar'
- return {id, data, event -> rpcnotify(g:channel, '1', a1, a2, data, event)}
- endfun
- let g:job_opts = {'on_stdout': MkFun()}
- call jobstart(['echo'], g:job_opts)
+ fun! MkFun()
+ let a1 = 'foo'
+ let a2 = 'bar'
+ return {id, data, event -> rpcnotify(g:channel, '1', a1, a2, Normalize(data), event)}
+ endfun
+ let g:job_opts = {'on_stdout': MkFun()}
+ call jobstart('echo "some text"', g:job_opts)
]])
- eq({'notification', '1', {'foo', 'bar', {'', ''}, 'stdout'}}, next_msg())
+ eq({'notification', '1', {'foo', 'bar', {'some text', ''}, 'stdout'}}, next_msg())
end)
it('jobstart() works when closure passed directly to `jobstart`', function()
source([[
- let g:job_opts = {'on_stdout': {id, data, event -> rpcnotify(g:channel, '1', 'foo', 'bar', data, event)}}
- call jobstart(['echo'], g:job_opts)
+ let g:job_opts = {'on_stdout': {id, data, event -> rpcnotify(g:channel, '1', 'foo', 'bar', Normalize(data), event)}}
+ call jobstart('echo "some text"', g:job_opts)
]])
- eq({'notification', '1', {'foo', 'bar', {'', ''}, 'stdout'}}, next_msg())
+ eq({'notification', '1', {'foo', 'bar', {'some text', ''}, 'stdout'}}, next_msg())
end)
describe('jobwait', function()