diff options
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' |