From ae1d0515049ed135878672e06b51b083f5ae384d Mon Sep 17 00:00:00 2001 From: w0rp Date: Sat, 16 Sep 2023 22:22:01 +0100 Subject: #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 --- test/handler/test_flawfinder_handler.vader | 26 ++++++++------------------ 1 file changed, 8 insertions(+), 18 deletions(-) (limited to 'test/handler/test_flawfinder_handler.vader') 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, [ - \ ":31:4: [1] (buffer) strncpy:Easily used incorrectly", + \ ':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(''), [ - \ ":12:4: [2] (buffer) char:Statically-sized arrays can be bad", - \ ":31:4: [1] (buffer) strncpy:Easily used incorrectly", + \ ':12:4: [2] (buffer) char:Statically-sized arrays can be bad', + \ ':31:4: [1] (buffer) strncpy:Easily used incorrectly', \ ]) -- cgit v1.2.3