mirror of
https://github.com/dense-analysis/ale.git
synced 2025-12-23 04:21:26 +08:00
Check user systemd unit files with systemd-analyze
This commit is contained in:
19
test/handler/test_systemd_analyze_hander.vader
Normal file
19
test/handler/test_systemd_analyze_hander.vader
Normal file
@@ -0,0 +1,19 @@
|
||||
Before:
|
||||
runtime ale_linters/systemd/systemd_analyze.vim
|
||||
|
||||
After:
|
||||
call ale#linter#Reset()
|
||||
|
||||
Execute(The systemd-analyze handler should parse lines correctly):
|
||||
AssertEqual
|
||||
\ [
|
||||
\ {
|
||||
\ 'lnum': 9,
|
||||
\ 'col': 1,
|
||||
\ 'type': 'W',
|
||||
\ 'text': 'Unknown key name ''Wat'' in section ''Service'', ignoring.',
|
||||
\ },
|
||||
\ ],
|
||||
\ ale_linters#systemd#systemd_analyze#Handle(bufnr(''), [
|
||||
\ '/home/user/.config/systemd/user/foo.service:9: Unknown key name ''Wat'' in section ''Service'', ignoring.',
|
||||
\ ])
|
||||
Reference in New Issue
Block a user