diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/handler/test_msgfmt_hander.vader | 24 | ||||
-rw-r--r-- | test/smoke_test.vader | 2 | ||||
-rw-r--r-- | test/test_ale_toggle.vader | 10 |
3 files changed, 32 insertions, 4 deletions
diff --git a/test/handler/test_msgfmt_hander.vader b/test/handler/test_msgfmt_hander.vader new file mode 100644 index 00000000..1a67dbc6 --- /dev/null +++ b/test/handler/test_msgfmt_hander.vader @@ -0,0 +1,24 @@ +Before: + runtime ale_linters/po/msgfmt.vim + +After: + call ale#linter#Reset() + +Execute(Duplicate messages should be made easier to navigate): + AssertEqual + \ [ + \ {'lnum': 14, 'col': 0, 'type': 'W', 'text': 'some other thing'}, + \ {'lnum': 1746, 'col': 0, 'type': 'W', 'text': 'duplicate of message at line 262'}, + \ {'lnum': 262, 'col': 0, 'type': 'W', 'text': 'first location of duplicate of message at line 1746'}, + \ {'lnum': 666, 'col': 0, 'type': 'W', 'text': 'duplicate message definition...'}, + \ {'lnum': 888, 'col': 0, 'type': 'W', 'text': 'some other thing'}, + \ {'lnum': 999, 'col': 0, 'type': 'W', 'text': '...this is the location of the first definition'}, + \ ], + \ ale_linters#po#msgfmt#Handle(bufnr(''), [ + \ '/tmp/v6GMUFf/16/foo.po:14: some other thing', + \ '/tmp/v6GMUFf/16/foo.po:1746: duplicate message definition...', + \ '/tmp/v6GMUFf/16/foo.po:262: ...this is the location of the first definition', + \ '/tmp/v6GMUFf/16/foo.po:666: duplicate message definition...', + \ '/tmp/v6GMUFf/16/foo.po:888: some other thing', + \ '/tmp/v6GMUFf/16/foo.po:999: ...this is the location of the first definition', + \ ]) diff --git a/test/smoke_test.vader b/test/smoke_test.vader index f6d0be56..843bddab 100644 --- a/test/smoke_test.vader +++ b/test/smoke_test.vader @@ -93,7 +93,7 @@ Execute(Linters should run in PowerShell too): \}) call ale#Lint() - call ale#engine#WaitForJobs(2000) + call ale#engine#WaitForJobs(4000) AssertEqual [ \ { diff --git a/test/test_ale_toggle.vader b/test/test_ale_toggle.vader index ca8b25d5..427000b6 100644 --- a/test/test_ale_toggle.vader +++ b/test/test_ale_toggle.vader @@ -12,7 +12,9 @@ Before: let g:ale_run_synchronously = 1 let g:ale_pattern_options = {} let g:ale_pattern_options_enabled = 1 - let g:ale_set_balloons = has('balloon_eval') + let g:ale_set_balloons = + \ has('balloon_eval') && has('gui_running') || + \ has('balloon_eval_term') && !has('gui_running') unlet! b:ale_enabled @@ -349,7 +351,8 @@ Execute(ALEResetBuffer should reset everything for a buffer): Execute(Disabling ALE should disable balloons): " These tests won't run in the console, but we can run them manually in GVim. - if has('balloon_eval') + if has('balloon_eval') && has('gui_running') || + \ has('balloon_eval_term') && !has('gui_running') call ale#linter#Reset() " Enable balloons, so we can check the expr value. @@ -367,7 +370,8 @@ Execute(Disabling ALE should disable balloons): endif Execute(Enabling ALE should enable balloons if the setting is on): - if has('balloon_eval') + if has('balloon_eval') && has('gui_running') || + \ has('balloon_eval_term') && !has('gui_running') call ale#linter#Reset() call ale#balloon#Disable() ALEDisable |