diff options
author | w0rp <devw0rp@gmail.com> | 2022-12-27 23:11:53 +0000 |
---|---|---|
committer | w0rp <devw0rp@gmail.com> | 2022-12-27 23:11:53 +0000 |
commit | a18472cc58b85ba4e037fe3ad4c3f525aef74a85 (patch) | |
tree | 74579a9a859fc9eb671ee95eae95441676e51487 /test/test_cursor_warnings.vader | |
parent | 98b2ef438e8e705a4788c2e1e9767cd40b12a16b (diff) | |
download | ale-a18472cc58b85ba4e037fe3ad4c3f525aef74a85.zip |
Close #4401 - Use subtle defaults for virtual-text
Default virtual-text to the Comment highlight group and prefix
virtual-text messages with comment text for each language by default.
Messages can now be formatted with `%type%` to print the error type.
The Vim 9.0 version has been updated in the Docker image to add test
coverage for virtual-text.
Diffstat (limited to 'test/test_cursor_warnings.vader')
-rw-r--r-- | test/test_cursor_warnings.vader | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/test/test_cursor_warnings.vader b/test/test_cursor_warnings.vader index b767d225..7aac7740 100644 --- a/test/test_cursor_warnings.vader +++ b/test/test_cursor_warnings.vader @@ -129,7 +129,7 @@ After: Given javascript(A Javscript file with warnings/errors): var x = 3 + 12345678 var x = 5*2 + parseInt("10"); - // comment + //" comment Execute(Messages should be shown for the correct lines): call cursor(1, 1) @@ -219,6 +219,26 @@ Execute(The severity should be formatted into the message correctly): AssertEqual 'Info: Some information', g:last_message +Execute(The type should be formatted into the message correctly): + let g:ale_echo_msg_format = '%type%: %s' + + call cursor(2, 9) + call ale#cursor#EchoCursorWarning() + + AssertEqual + \ 'W: Infix operators must be spaced.', + \ g:last_message + + call cursor(1, 10) + call ale#cursor#EchoCursorWarning() + + AssertEqual 'E: Missing semicolon.', g:last_message + + call cursor(1, 14) + call ale#cursor#EchoCursorWarning() + + AssertEqual 'I: Some information', g:last_message + Execute(The %code% and %ifcode% should show the code and some text): let g:ale_echo_msg_format = '%(code) %%s' |