Try to fix Windows tests again

This commit is contained in:
w0rp 2020-08-23 20:14:08 +01:00
parent c0566db1d2
commit d4583f1a63
No known key found for this signature in database
GPG Key ID: 0FC1ECAA8C81CD83
2 changed files with 10 additions and 5 deletions

View File

@ -230,6 +230,11 @@ Execute(Should apply filename mpapings):
ALEFix
call ale#test#FlushJobs()
if has('win32')
" We have to correct the output on Windows.
call setline(1, substitute(getline(1), '\r', '', ''))
endif
Expect(The mapped filename should be printed):
/some/fake/path/test.txt

View File

@ -13,13 +13,13 @@ After:
Execute(FixLocList should map filenames):
" Paths converted back into temporary filenames shouldn't be included.
let g:ale_filename_mappings = {
\ 'linter2': [['/xxx', '/data']],
\ 'linter2': [['/xxx/', '/data/']],
\ 'linter1': [
\ ['/bar', '/data/special'],
\ ['/foo', '/data'],
\ ['/bar/', '/data/special/'],
\ ['/foo/', '/data/'],
\ [
\ ale#path#Simplify(fnamemodify(ale#util#Tempname(), ':h:h')),
\ '/x-tmp',
\ ale#path#Simplify(fnamemodify(ale#util#Tempname(), ':h:h')) . '/',
\ '/x-tmp/',
\ ],
\ ],
\}