Make temporary file detection work on just about all platforms
This commit is contained in:
@@ -16,7 +16,7 @@ Execute(The ansible-lint handler should handle basic errors):
|
||||
\ },
|
||||
\ ],
|
||||
\ ale_linters#ansible#ansible_lint#Handle(bufnr(''), [
|
||||
\ '/tmp/vxepmGL/1/main.yml:35: [EANSIBLE0002] Trailing whitespace',
|
||||
\ fnamemodify(tempname(), ':h') . '/main.yml:35: [EANSIBLE0002] Trailing whitespace',
|
||||
\ ])
|
||||
|
||||
Execute (The ansible-lint handler should handle names with spaces):
|
||||
@@ -30,7 +30,7 @@ Execute (The ansible-lint handler should handle names with spaces):
|
||||
\ },
|
||||
\ ],
|
||||
\ ale_linters#ansible#ansible_lint#Handle(bufnr(''), [
|
||||
\ '/tmp/vxepm GL/1/main.yml:6:6: E111 indentation is not a multiple of four',
|
||||
\ fnamemodify(tempname(), ':h') . '/main.yml:6:6: E111 indentation is not a multiple of four',
|
||||
\ ])
|
||||
|
||||
Execute (The ansible-lint handler should ignore errors from other files):
|
||||
|
||||
@@ -52,9 +52,4 @@ Execute(ale#path#IsBufferPath should accept various names for stdin):
|
||||
Execute(ale#path#IsBufferPath should match files in /tmp):
|
||||
call ale#test#SetFilename('app/test.ts')
|
||||
|
||||
" Skip these checks on Windows.
|
||||
if !has('win32')
|
||||
Assert ale#path#IsBufferPath(bufnr(''), '../../../../../../../../tmp/vG0hKyD/1/test.ts')
|
||||
Assert ale#path#IsBufferPath(bufnr(''), '/tmp/vG0hKyD/1/test.ts')
|
||||
Assert ale#path#IsBufferPath(bufnr(''), '/run/user/1000/vG0hKyD/1/test.ts')
|
||||
endif
|
||||
Assert ale#path#IsBufferPath(bufnr(''), tempname() . '/test.ts')
|
||||
|
||||
Reference in New Issue
Block a user