]> git.madduck.net Git - etc/vim.git/blob - test/linter/test_djlint.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 / linter / test_djlint.vader
1 Before:
2   call ale#assert#SetUpLinterTest('html', 'djlint')
3
4 After:
5   call ale#assert#TearDownLinterTest()
6
7 Execute(The default djlint command should be correct):
8   AssertLinter 'djlint', ale#Escape('djlint') . ' %s'
9
10 Execute(The executable should be configurable):
11   let g:ale_html_djlint_executable = 'foo bar'
12   let g:ale_html_djlint_options = '--option'
13
14   AssertLinter 'foo bar', ale#Escape('foo bar') . ' --option %s'
15
16 Execute(The --profile option should not be overridden):
17   call ale#test#SetFilename('../test-files/djlint/testfile.html')
18
19   set filetype=htmldjango
20   let g:ale_html_djlint_options = '--profile jinja'
21
22   AssertLinter 'djlint', ale#Escape(g:ale_html_djlint_executable)
23   \     . ' --profile jinja'
24   \     . ' %s',
25
26 Execute(Should set --profile for htmlangular):
27   call ale#test#SetFilename('../test-files/djlint/testfile.html')
28
29   set filetype=htmlangular
30
31   AssertLinter 'djlint', ale#Escape(g:ale_html_djlint_executable)
32   \     . ' --profile angular'
33   \     . ' %s',
34
35 Execute(Should set --profile for jinja):
36   call ale#test#SetFilename('../test-files/djlint/testfile.html')
37
38   set filetype=jinja
39
40   AssertLinter 'djlint', ale#Escape(g:ale_html_djlint_executable)
41   \     . ' --profile jinja'
42   \     . ' %s',
43
44 Execute(Should set --profile for Handlebars):
45   call ale#test#SetFilename('../test-files/djlint/testfile.html')
46
47   set filetype=handlebars
48
49   AssertLinter 'djlint', ale#Escape(g:ale_html_djlint_executable)
50   \     . ' --profile handlebars'
51   \     . ' %s',
52
53 Execute(Should set --profile for nunjucks):
54   call ale#test#SetFilename('../test-files/djlint/testfile.html')
55
56   set filetype=nunjucks
57
58   AssertLinter 'djlint', ale#Escape(g:ale_html_djlint_executable)
59   \     . ' --profile nunjucks'
60   \     . ' %s',
61
62 Execute(Should set --profile for Go HTML Templates):
63   call ale#test#SetFilename('../test-files/djlint/testfile.html')
64
65   set filetype=gohtmltmpl
66
67   AssertLinter 'djlint', ale#Escape(g:ale_html_djlint_executable)
68   \     . ' --profile golang'
69   \     . ' %s',