win: enable more functional tests

- plugin/shada_spec.lua: Use \r\n as Windows EOL for tests on
  BufWriteCmd, FileWriteCmd, FileAppendCmd. Alternative is 'set
  fileformat=unix'.
This commit is contained in:
Jan Edmund Lazo
2017-10-19 17:26:03 -04:00
committed by Justin M. Keyes
parent e9b5616eaf
commit 7311fb7cad
11 changed files with 7 additions and 36 deletions

View File

@@ -3,8 +3,6 @@ local clear = helpers.clear
local eq = helpers.eq
local getcwd = helpers.funcs.getcwd
if helpers.pending_win32(pending) then return end
describe("'autochdir'", function()
it('given on the shell gets processed properly', function()
local targetdir = 'test/functional/fixtures'
@@ -12,9 +10,10 @@ describe("'autochdir'", function()
-- By default 'autochdir' is off, thus getcwd() returns the repo root.
clear(targetdir..'/tty-test.c')
local rootdir = getcwd()
local expected = rootdir .. '/' .. targetdir
-- With 'autochdir' on, we should get the directory of tty-test.c.
clear('--cmd', 'set autochdir', targetdir..'/tty-test.c')
eq(rootdir..'/'..targetdir, getcwd())
eq(helpers.iswin() and expected:gsub('/', '\\') or expected, getcwd())
end)
end)