]> git.madduck.net Git - etc/vim.git/blobdiff - .vim/bundle/ale/test/handler/test_fish_handler.vader

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

All patches and comments are welcome. Please squash your changes to logical commits before using git-format-patch and git-send-email to patches@git.madduck.net. If you'd read over the Git project's submission guidelines and adhered to them, I'd be especially grateful.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

Merge commit '76265755a1add77121c8f9dabb3e9bb70fe9a972' as '.vim/bundle/ale'
[etc/vim.git] / .vim / bundle / ale / test / handler / test_fish_handler.vader
diff --git a/.vim/bundle/ale/test/handler/test_fish_handler.vader b/.vim/bundle/ale/test/handler/test_fish_handler.vader
new file mode 100644 (file)
index 0000000..25942ab
--- /dev/null
@@ -0,0 +1,61 @@
+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'",
+  \    '^',
+  \ ])
+
+Execute(The fish handler should handle problems where the problem before before the line with the line number):
+  AssertEqual
+  \ [
+  \   {
+  \     'lnum': 2,
+  \     'col': 23,
+  \     'text': 'Unsupported use of ''||''. In fish, please use ''COMMAND; or COMMAND''.',
+  \   },
+  \   {
+  \     'lnum': 5,
+  \     'col': 1,
+  \     'text': 'wat',
+  \   },
+  \ ],
+  \ ale_linters#fish#fish#Handle(bufnr(''), [
+  \   'Unsupported use of ''||''. In fish, please use ''COMMAND; or COMMAND''.',
+  \   '/tmp/vLz620o/258/test.fish (line 2): if set -q SSH_CLIENT || set -q SSH_TTY',
+  \   '                                                           ^',
+  \   '/tmp/vLz620o/258/test.fish (line 5): wat',
+  \   '                                     ^',
+  \ ])