test_alex_handler.vader
1 Execute(The alex handler should handle the example from the alex README): 2 AssertEqual 3 \ [ 4 \ { 5 \ 'lnum': 1, 6 \ 'col': 5, 7 \ 'end_lnum': 1, 8 \ 'end_col': 13, 9 \ 'type': 'W', 10 \ 'text': '`boogeyman` may be insensitive, use `boogey` instead (retext-equality)', 11 \ }, 12 \ { 13 \ 'lnum': 1, 14 \ 'col': 42, 15 \ 'end_lnum': 1, 16 \ 'end_col': 47, 17 \ 'type': 'W', 18 \ 'text': '`master` / `slaves` may be insensitive, use `primary` / `replica` instead (retext-equality)', 19 \ }, 20 \ { 21 \ 'lnum': 1, 22 \ 'col': 69, 23 \ 'end_lnum': 1, 24 \ 'end_col': 74, 25 \ 'type': 'W', 26 \ 'text': 'Don’t use “slaves”, it’s profane (retext-profanities)', 27 \ }, 28 \ { 29 \ 'lnum': 2, 30 \ 'col': 52, 31 \ 'end_lnum': 2, 32 \ 'end_col': 53, 33 \ 'type': 'W', 34 \ 'text': '`he` may be insensitive, use `they`, `it` instead (retext-equality)', 35 \ }, 36 \ { 37 \ 'lnum': 2, 38 \ 'col': 61, 39 \ 'end_lnum': 2, 40 \ 'end_col': 67, 41 \ 'type': 'W', 42 \ 'text': '`cripple` may be insensitive, use `person with a limp` instead (retext-equality)', 43 \ }, 44 \ ], 45 \ ale#handlers#alex#Handle(bufnr(''), [ 46 \ 'example.md', 47 \ ' 1:5-1:14 warning `boogeyman` may be insensitive, use `boogey` instead boogeyman-boogeywoman retext-equality', 48 \ ' 1:42-1:48 warning `master` / `slaves` may be insensitive, use `primary` / `replica` instead master-slave retext-equality', 49 \ ' 1:69-1:75 warning Don’t use “slaves”, it’s profane slaves retext-profanities', 50 \ ' 2:52-2:54 warning `he` may be insensitive, use `they`, `it` instead he-she retext-equality', 51 \ ' 2:61-2:68 warning `cripple` may be insensitive, use `person with a limp` instead cripple retext-equality', 52 \ '', 53 \ '⚠ 5 warnings', 54 \ ])