diff options
author | Niraj Thapaliya <nthapaliya@users.noreply.github.com> | 2017-12-26 13:04:06 -0600 |
---|---|---|
committer | Niraj Thapaliya <nthapaliya@users.noreply.github.com> | 2017-12-26 14:10:28 -0600 |
commit | 3b0c67e42c4bffbe90edb98a181497a9791d9de4 (patch) | |
tree | 2ea5b6341fccabd9b7c326743ee478b3df75527a /test/handler/test_fish_handler.vader | |
parent | c90b45c559342f22fdeee9e8ace0927406aa4b0b (diff) | |
download | ale-3b0c67e42c4bffbe90edb98a181497a9791d9de4.zip |
Add handler test
Diffstat (limited to 'test/handler/test_fish_handler.vader')
-rw-r--r-- | test/handler/test_fish_handler.vader | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/test/handler/test_fish_handler.vader b/test/handler/test_fish_handler.vader new file mode 100644 index 00000000..567952e4 --- /dev/null +++ b/test/handler/test_fish_handler.vader @@ -0,0 +1,39 @@ +Before: + runtime ale_linters/fish/fish.vim + +After: + call ale#linter#Reset() + +Execute(The fish handler should handle basic warnings and syntax errors): + AssertEqual + \ [ + \ { + \ 'lnum': 20, + \ 'col': 23, + \ 'text': "Unsupported use of '||'. In fish, please use 'COMMAND; or COMMAND'.", + \ }, + \ { + \ 'lnum': 26, + \ 'col': 7, + \ 'text': "Illegal command name '(prompt_pwd)'", + \ }, + \ { + \ 'lnum': 36, + \ 'col': 1, + \ 'text': "'end' outside of a block", + \ }, + \ ], + \ ale_linters#fish#fish#Handle(1, [ + \ "fish_prompt.fish (line 20): Unsupported use of '||'. In fish, please use 'COMMAND; or COMMAND'.", + \ 'if set -q SSH_CLIENT || set -q SSH_TTY', + \ ' ^', + \ "fish_prompt.fish (line 26): Illegal command name '(prompt_pwd)'", + \ ' (prompt_pwd) \', + \ ' ^', + \ "fish_prompt.fish (line 36): 'end' outside of a block", + \ 'end', + \ '^', + \ 'config.fish (line 45):', + \ "abbr --add p 'cd ~/Projects'", + \ '^', + \ ]) |