Fix the eslint_d fixer tests for Windows

This commit is contained in:
w0rp 2017-11-22 17:25:37 +00:00
parent 6e65998ca7
commit 9857e0a4b7

View File

@ -75,8 +75,8 @@ Execute(--fix-to-stdout should be used for eslint_d):
AssertEqual AssertEqual
\ { \ {
\ 'read_temporary_file': 1, \ 'read_temporary_file': 1,
\ 'command': (has('win32') ? 'node.exe ' : '') \ 'command':
\ . ale#Escape(ale#path#Winify(g:dir . '/../eslint-test-files/app-with-eslint-d/node_modules/.bin/eslint_d')) \ ale#Escape(ale#path#Winify(g:dir . '/../eslint-test-files/app-with-eslint-d/node_modules/.bin/eslint_d'))
\ . ' -c ' . ale#Escape(ale#path#Winify(g:dir . '/../eslint-test-files/package.json')) \ . ' -c ' . ale#Escape(ale#path#Winify(g:dir . '/../eslint-test-files/package.json'))
\ . ' --fix %t', \ . ' --fix %t',
\ }, \ },
@ -86,8 +86,8 @@ Execute(--fix-to-stdout should be used for eslint_d):
" We look at the ESLint version instead of the eslint_d version. " We look at the ESLint version instead of the eslint_d version.
AssertEqual AssertEqual
\ { \ {
\ 'command': (has('win32') ? 'node.exe ' : '') \ 'command':
\ . ale#Escape(ale#path#Winify(g:dir . '/../eslint-test-files/app-with-eslint-d/node_modules/.bin/eslint_d')) \ ale#Escape(ale#path#Winify(g:dir . '/../eslint-test-files/app-with-eslint-d/node_modules/.bin/eslint_d'))
\ . ' --stdin-filename %s --stdin --fix-to-stdout', \ . ' --stdin-filename %s --stdin --fix-to-stdout',
\ }, \ },
\ ale#fixers#eslint#ApplyFixForVersion(bufnr(''), ['v3.19.0 (eslint_d v4.2.0)']) \ ale#fixers#eslint#ApplyFixForVersion(bufnr(''), ['v3.19.0 (eslint_d v4.2.0)'])
@ -95,8 +95,8 @@ Execute(--fix-to-stdout should be used for eslint_d):
" The option should be used for new versions too. " The option should be used for new versions too.
AssertEqual AssertEqual
\ { \ {
\ 'command': (has('win32') ? 'node.exe ' : '') \ 'command':
\ . ale#Escape(ale#path#Winify(g:dir . '/../eslint-test-files/app-with-eslint-d/node_modules/.bin/eslint_d')) \ ale#Escape(ale#path#Winify(g:dir . '/../eslint-test-files/app-with-eslint-d/node_modules/.bin/eslint_d'))
\ . ' --stdin-filename %s --stdin --fix-to-stdout', \ . ' --stdin-filename %s --stdin --fix-to-stdout',
\ }, \ },
\ ale#fixers#eslint#ApplyFixForVersion(bufnr(''), ['4.9.0']) \ ale#fixers#eslint#ApplyFixForVersion(bufnr(''), ['4.9.0'])