2017-06-29 10:40:03 +00:00
|
|
|
Before:
|
2018-07-15 17:24:53 +00:00
|
|
|
call ale#assert#SetUpLinterTest('pug', 'puglint')
|
2017-06-29 10:40:03 +00:00
|
|
|
|
|
|
|
After:
|
2018-07-15 17:24:53 +00:00
|
|
|
call ale#assert#TearDownLinterTest()
|
2017-06-29 10:40:03 +00:00
|
|
|
|
|
|
|
Execute(puglint should detect local executables and package.json):
|
2021-03-20 22:11:22 +00:00
|
|
|
call ale#test#SetFilename('../test-files/puglint/test.pug')
|
2017-06-29 10:40:03 +00:00
|
|
|
|
2018-07-15 17:24:53 +00:00
|
|
|
AssertLinter
|
2021-03-20 22:11:22 +00:00
|
|
|
\ ale#path#Simplify(g:dir . '/../test-files/puglint/node_modules/.bin/pug-lint'),
|
|
|
|
\ ale#Escape(ale#path#Simplify(g:dir . '/../test-files/puglint/node_modules/.bin/pug-lint'))
|
|
|
|
\ . ' -c ' . ale#Escape(ale#path#Simplify(g:dir . '/../test-files/puglint/package.json'))
|
2018-07-15 17:24:53 +00:00
|
|
|
\ . ' -r inline %t'
|
2017-06-29 10:40:03 +00:00
|
|
|
|
|
|
|
Execute(puglint should use global executables if configured):
|
|
|
|
let g:ale_pug_puglint_use_global = 1
|
|
|
|
|
2021-03-20 22:11:22 +00:00
|
|
|
call ale#test#SetFilename('../test-files/puglint/test.pug')
|
2017-06-29 10:40:03 +00:00
|
|
|
|
2018-07-15 17:24:53 +00:00
|
|
|
AssertLinter 'pug-lint',
|
2017-06-29 10:40:03 +00:00
|
|
|
\ ale#Escape('pug-lint')
|
2021-03-20 22:11:22 +00:00
|
|
|
\ . ' -c ' . ale#Escape(ale#path#Simplify(g:dir . '/../test-files/puglint/package.json'))
|
2018-07-15 17:24:53 +00:00
|
|
|
\ . ' -r inline %t'
|
2017-06-29 10:40:03 +00:00
|
|
|
|
|
|
|
Execute(puglint should detect .pug-lintrc):
|
2021-03-20 22:11:22 +00:00
|
|
|
call ale#test#SetFilename('../test-files/puglint/puglint_rc_dir/subdir/test.pug')
|
2017-06-29 10:40:03 +00:00
|
|
|
|
2021-03-20 22:11:22 +00:00
|
|
|
AssertLinter ale#path#Simplify(g:dir . '/../test-files/puglint/node_modules/.bin/pug-lint'),
|
|
|
|
\ ale#Escape(ale#path#Simplify(g:dir . '/../test-files/puglint/node_modules/.bin/pug-lint'))
|
|
|
|
\ . ' -c ' . ale#Escape(ale#path#Simplify(g:dir . '/../test-files/puglint/puglint_rc_dir/.pug-lintrc'))
|
2018-07-15 17:24:53 +00:00
|
|
|
\ . ' -r inline %t'
|
2017-06-29 10:40:03 +00:00
|
|
|
|
|
|
|
Execute(puglint should detect .pug-lintrc.js):
|
2021-03-20 22:11:22 +00:00
|
|
|
call ale#test#SetFilename('../test-files/puglint/puglint_rc_js_dir/subdir/test.pug')
|
2017-06-29 10:40:03 +00:00
|
|
|
|
2021-03-20 22:11:22 +00:00
|
|
|
AssertLinter ale#path#Simplify(g:dir . '/../test-files/puglint/node_modules/.bin/pug-lint'),
|
|
|
|
\ ale#Escape(ale#path#Simplify(g:dir . '/../test-files/puglint/node_modules/.bin/pug-lint'))
|
|
|
|
\ . ' -c ' . ale#Escape(ale#path#Simplify(g:dir . '/../test-files/puglint/puglint_rc_js_dir/.pug-lintrc.js'))
|
2018-07-15 17:24:53 +00:00
|
|
|
\ . ' -r inline %t'
|
2017-06-29 10:40:03 +00:00
|
|
|
|
|
|
|
Execute(puglint should detect .pug-lintrc.json):
|
2021-03-20 22:11:22 +00:00
|
|
|
call ale#test#SetFilename('../test-files/puglint/puglint_rc_json_dir/subdir/test.pug')
|
2017-06-29 10:40:03 +00:00
|
|
|
|
2021-03-20 22:11:22 +00:00
|
|
|
AssertLinter ale#path#Simplify(g:dir . '/../test-files/puglint/node_modules/.bin/pug-lint'),
|
|
|
|
\ ale#Escape(ale#path#Simplify(g:dir . '/../test-files/puglint/node_modules/.bin/pug-lint'))
|
|
|
|
\ . ' -c ' . ale#Escape(ale#path#Simplify(g:dir . '/../test-files/puglint/puglint_rc_json_dir/.pug-lintrc.json'))
|
2018-07-15 17:24:53 +00:00
|
|
|
\ . ' -r inline %t'
|