ale/test/command_callback/test_tslint_command_callback.vader

28 lines
839 B
Plaintext
Raw Normal View History

Before:
call ale#assert#SetUpLinterTest('typescript', 'tslint')
call ale#test#SetFilename('test.ts')
After:
call ale#assert#TearDownLinterTest()
Execute(The default tslint command should be correct):
AssertLinter 'tslint',
2018-10-23 10:20:27 -04:00
\ ale#path#CdString(expand('%:p:h'))
2018-07-06 17:46:36 -04:00
\ . ale#Escape('tslint') . ' --format json %t'
Execute(The rules directory option should be included if set):
let b:ale_typescript_tslint_rules_dir = '/foo/bar'
AssertLinter 'tslint',
2018-10-23 10:20:27 -04:00
\ ale#path#CdString(expand('%:p:h'))
2018-03-18 12:48:28 -04:00
\ . ale#Escape('tslint') . ' --format json'
\ . ' -r ' . ale#Escape('/foo/bar')
2018-07-06 17:46:36 -04:00
\ . ' %t'
2018-03-18 12:48:28 -04:00
Execute(The executable should be configurable and escaped):
let b:ale_typescript_tslint_executable = 'foo bar'
AssertLinter 'foo bar',
2018-10-23 10:20:27 -04:00
\ ale#path#CdString(expand('%:p:h'))
2018-07-06 17:46:36 -04:00
\ . ale#Escape('foo bar') . ' --format json %t'