test_lua_selene_handler.vader
1 Before: 2 runtime ale_linters/lua/selene.vim 3 4 After: 5 Restore 6 call ale#linter#Reset() 7 8 Execute(The selene handler for Lua should parse input correctly): 9 AssertEqual 10 \ [ 11 \ { 12 \ 'lnum': 1, 13 \ 'end_lnum': 2, 14 \ 'col': 1, 15 \ 'end_col': 3, 16 \ 'text': 'empty if block', 17 \ 'code': 'empty_if', 18 \ 'type': 'W', 19 \ }, 20 \ { 21 \ 'lnum': 1, 22 \ 'end_lnum': 1, 23 \ 'col': 4, 24 \ 'end_col': 11, 25 \ 'text': 'comparing things to nan directly is not allowed', 26 \ 'code': 'compare_nan', 27 \ 'type': 'E', 28 \ 'detail': "comparing things to nan directly is not allowed\n\ntry: `x ~= x` instead" 29 \ }, 30 \ ], 31 \ ale_linters#lua#selene#Handle(0, [ 32 \ '{"severity":"Warning","code":"empty_if","message":"empty if block","primary_label":{"span":{"start":0,"start_line":0,"start_column":0,"end":20,"end_line":1,"end_column":3},"message":""},"notes":[],"secondary_labels":[]}', 33 \ '{"severity":"Error","code":"compare_nan","message":"comparing things to nan directly is not allowed","primary_label":{"span":{"start":3,"start_line":0,"start_column":3,"end":11,"end_line":0,"end_column":11},"message":""},"notes":["try: `x ~= x` instead"],"secondary_labels":[]}', 34 \ 'Results:', 35 \ '1 errors', 36 \ '1 warnings', 37 \ '0 parse errors', 38 \ ])