]> git.madduck.net Git - etc/vim.git/blob - test/handler/test_lessc_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:

Squashed '.vim/bundle/ale/' content from commit 22185c4c
[etc/vim.git] / test / handler / test_lessc_handler.vader
1 Before:
2   call ale#test#SetDirectory('/testplugin/test/handler')
3   call ale#test#SetFilename('testfile.less')
4
5   runtime ale_linters/less/lessc.vim
6
7 After:
8   call ale#test#RestoreDirectory()
9   call ale#linter#Reset()
10
11 Execute(The lessc handler should handle errors for the current file correctly):
12   AssertEqual
13   \ [
14   \   {
15   \     'lnum': 2,
16   \     'col': 1,
17   \     'type': 'E',
18   \     'text': 'Unrecognised input. Possibly missing something',
19   \   },
20   \ ],
21   \ ale_linters#less#lessc#Handle(bufnr(''), [
22   \   'ParseError: Unrecognised input. Possibly missing something in - on line 2, column 1:',
23   \   '1 vwewww',
24   \   '2    ',
25   \])
26
27 Execute(The lessc handler should handle errors for other files in the same directory correctly):
28   AssertEqual
29   \ [
30   \   {
31   \     'lnum': 2,
32   \     'col': 1,
33   \     'type': 'E',
34   \     'text': 'Unrecognised input. Possibly missing something',
35   \     'filename': ale#path#Simplify(g:dir . '/imported.less')
36   \   },
37   \   {
38   \     'lnum': 2,
39   \     'col': 1,
40   \     'type': 'E',
41   \     'text': 'Unrecognised input. Possibly missing something',
42   \     'filename': ale#path#Simplify(g:dir . '/imported.less')
43   \   },
44   \ ],
45   \ ale_linters#less#lessc#Handle(bufnr(''), [
46   \   'ParseError: Unrecognised input. Possibly missing something in imported.less on line 2, column 1:',
47   \   '1 vwewww',
48   \   '2    ',
49   \   'ParseError: Unrecognised input. Possibly missing something in ./imported.less on line 2, column 1:',
50   \   '1 vwewww',
51   \   '2    ',
52   \])
53
54 Execute(The lessc handler should handle errors for files in directories above correctly):
55   AssertEqual
56   \ [
57   \   {
58   \     'lnum': 2,
59   \     'col': 1,
60   \     'type': 'E',
61   \     'text': 'Unrecognised input. Possibly missing something',
62   \     'filename': ale#path#Simplify(g:dir . '/../imported2.less')
63   \   },
64   \ ],
65   \ ale_linters#less#lessc#Handle(bufnr(''), [
66   \   'ParseError: Unrecognised input. Possibly missing something in ../imported2.less on line 2, column 1:',
67   \   '1 vwewww',
68   \   '2    ',
69   \])