#3633 - Put all dummy test files in test/test-files

This commit is contained in:
w0rp
2021-03-20 22:11:22 +00:00
parent 3838ae118d
commit b1d833417b
581 changed files with 1027 additions and 1123 deletions

View File

@@ -15,62 +15,62 @@ Execute(The default command should be correct):
AssertLinter 'eslint', ale#Escape('eslint') . b:args
Execute(create-react-app directories should be detected correctly):
call ale#test#SetFilename('../eslint-test-files/react-app/subdir/testfile.js')
call ale#test#SetFilename('../test-files/eslint/react-app/subdir/testfile.js')
let b:executable = ale#path#Simplify(g:dir . '/../eslint-test-files/react-app/node_modules/eslint/bin/eslint.js')
AssertLinterCwd ale#path#Simplify(g:dir . '/../eslint-test-files/react-app')
let b:executable = ale#path#Simplify(g:dir . '/../test-files/eslint/react-app/node_modules/eslint/bin/eslint.js')
AssertLinterCwd ale#path#Simplify(g:dir . '/../test-files/eslint/react-app')
AssertLinter b:executable,
\ (has('win32') ? ale#Escape('node.exe') . ' ' : '')
\ . ale#Escape(b:executable) . b:args
Execute(use-global should override create-react-app detection):
call ale#test#SetFilename('../eslint-test-files/react-app/subdir/testfile.js')
call ale#test#SetFilename('../test-files/eslint/react-app/subdir/testfile.js')
let g:ale_javascript_eslint_use_global = 1
let g:ale_javascript_eslint_executable = 'eslint_d'
let b:executable = 'eslint_d'
AssertLinterCwd ale#path#Simplify(g:dir . '/../eslint-test-files/react-app')
AssertLinterCwd ale#path#Simplify(g:dir . '/../test-files/eslint/react-app')
AssertLinter b:executable, ale#Escape(b:executable) . b:args
Execute(other app directories should be detected correctly):
call ale#test#SetFilename('../eslint-test-files/other-app/subdir/testfile.js')
call ale#test#SetFilename('../test-files/eslint/other-app/subdir/testfile.js')
let b:executable = ale#path#Simplify(g:dir . '/../eslint-test-files/node_modules/.bin/eslint')
AssertLinterCwd ale#path#Simplify(g:dir . '/../eslint-test-files')
let b:executable = ale#path#Simplify(g:dir . '/../test-files/eslint/node_modules/.bin/eslint')
AssertLinterCwd ale#path#Simplify(g:dir . '/../test-files/eslint')
AssertLinter b:executable, ale#Escape(b:executable) . b:args
Execute(use-global should override other app directories):
call ale#test#SetFilename('../eslint-test-files/other-app/subdir/testfile.js')
call ale#test#SetFilename('../test-files/eslint/other-app/subdir/testfile.js')
let g:ale_javascript_eslint_use_global = 1
let g:ale_javascript_eslint_executable = 'eslint_d'
let b:executable = 'eslint_d'
AssertLinterCwd ale#path#Simplify(g:dir . '/../eslint-test-files')
AssertLinterCwd ale#path#Simplify(g:dir . '/../test-files/eslint')
AssertLinter b:executable, ale#Escape(b:executable) . b:args
Execute(eslint_d should be detected correctly):
call ale#test#SetFilename('../eslint-test-files/app-with-eslint-d/testfile.js')
call ale#test#SetFilename('../test-files/eslint/app-with-eslint-d/testfile.js')
let b:executable = ale#path#Simplify(g:dir . '/../eslint-test-files/app-with-eslint-d/node_modules/.bin/eslint_d')
AssertLinterCwd ale#path#Simplify(g:dir . '/../eslint-test-files/app-with-eslint-d')
let b:executable = ale#path#Simplify(g:dir . '/../test-files/eslint/app-with-eslint-d/node_modules/.bin/eslint_d')
AssertLinterCwd ale#path#Simplify(g:dir . '/../test-files/eslint/app-with-eslint-d')
AssertLinter b:executable, ale#Escape(b:executable) . b:args
Execute(eslint.js executables should be run with node on Windows):
call ale#test#SetFilename('../eslint-test-files/react-app/subdir/testfile.js')
call ale#test#SetFilename('../test-files/eslint/react-app/subdir/testfile.js')
let b:executable = ale#path#Simplify(g:dir . '/../eslint-test-files/react-app/node_modules/eslint/bin/eslint.js')
AssertLinterCwd ale#path#Simplify(g:dir . '/../eslint-test-files/react-app')
let b:executable = ale#path#Simplify(g:dir . '/../test-files/eslint/react-app/node_modules/eslint/bin/eslint.js')
AssertLinterCwd ale#path#Simplify(g:dir . '/../test-files/eslint/react-app')
AssertLinter b:executable,
\ (has('win32') ? ale#Escape('node.exe') . ' ' : '')
\ . ale#Escape(b:executable) . b:args
Execute(eslint.js should be run from a containing project with eslint):
call ale#test#SetFilename('../eslint-test-files/react-app/subdir-with-package-json/testfile.js')
call ale#test#SetFilename('../test-files/eslint/react-app/subdir-with-package-json/testfile.js')
let b:executable = ale#path#Simplify(g:dir . '/../eslint-test-files/react-app/node_modules/eslint/bin/eslint.js')
AssertLinterCwd ale#path#Simplify(g:dir . '/../eslint-test-files/react-app')
let b:executable = ale#path#Simplify(g:dir . '/../test-files/eslint/react-app/node_modules/eslint/bin/eslint.js')
AssertLinterCwd ale#path#Simplify(g:dir . '/../test-files/eslint/react-app')
AssertLinter b:executable,
\ (has('win32') ? ale#Escape('node.exe') . ' ' : '')
\ . ale#Escape(b:executable) . b:args