diff options
author | w0rp <devw0rp@gmail.com> | 2023-09-16 22:22:01 +0100 |
---|---|---|
committer | w0rp <devw0rp@gmail.com> | 2023-09-16 22:23:30 +0100 |
commit | ae1d0515049ed135878672e06b51b083f5ae384d (patch) | |
tree | 1556645edaf786bc934be9cc8cc63408e65054d4 /test/handler/test_flawfinder_handler.vader | |
parent | 4b11cf21dc8406b579b89e50ae3f08ef2c0856e1 (diff) | |
download | ale-ae1d0515049ed135878672e06b51b083f5ae384d.zip |
#4454 Clean up more tests and code
* Remove some tests we no longer need
* Delete blocks of redundant code
* Compress some tests together to simplify them
* Remove a little code for ancient linter versions
* Escape more executables we didn't escape before
* Rename a deno option that didn't match our conventions
Diffstat (limited to 'test/handler/test_flawfinder_handler.vader')
-rw-r--r-- | test/handler/test_flawfinder_handler.vader | 26 |
1 files changed, 8 insertions, 18 deletions
diff --git a/test/handler/test_flawfinder_handler.vader b/test/handler/test_flawfinder_handler.vader index 708bac2a..01dd1698 100644 --- a/test/handler/test_flawfinder_handler.vader +++ b/test/handler/test_flawfinder_handler.vader @@ -1,23 +1,10 @@ Before: - Save g:ale_c_flawfinder_error_severity - - unlet! g:ale_c_flawfinder_error_severity - unlet! b:ale_c_flawfinder_error_severity - + Save b:ale_c_flawfinder_error_severity runtime ale_linters/c/flawfinder.vim After: - unlet! g:ale_c_flawfinder_error_severity Restore - -Execute(The Flawfinder handler should ignore other lines of output): - AssertEqual - \ [], - \ ale#handlers#flawfinder#HandleFlawfinderFormat(347, [ - \ 'foo', - \ 'bar', - \ 'baz', - \ ]) + call ale#linter#Reset() Execute(The Flawfinder handler should work): AssertEqual @@ -30,7 +17,10 @@ Execute(The Flawfinder handler should work): \ }, \ ], \ ale#handlers#flawfinder#HandleFlawfinderFormat(347, [ - \ "<stdin>:31:4: [1] (buffer) strncpy:Easily used incorrectly", + \ '<stdin>:31:4: [1] (buffer) strncpy:Easily used incorrectly', + \ 'foo', + \ 'bar', + \ 'baz', \ ]) Execute(The Flawfinder error severity level should be configurable): @@ -52,6 +42,6 @@ Execute(The Flawfinder error severity level should be configurable): \ }, \ ], \ ale#handlers#flawfinder#HandleFlawfinderFormat(bufnr(''), [ - \ "<stdin>:12:4: [2] (buffer) char:Statically-sized arrays can be bad", - \ "<stdin>:31:4: [1] (buffer) strncpy:Easily used incorrectly", + \ '<stdin>:12:4: [2] (buffer) char:Statically-sized arrays can be bad', + \ '<stdin>:31:4: [1] (buffer) strncpy:Easily used incorrectly', \ ]) |