]> git.madduck.net Git - etc/vim.git/blob - test/linter/test_elm_make.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_elm_make.vader
1 Before:
2   call ale#assert#SetUpLinterTest('elm', 'make')
3
4 After:
5   unlet! g:executable
6
7   call ale#assert#TearDownLinterTest()
8
9 Execute(should get valid executable with default params):
10   call ale#test#SetFilename('../test-files/elm/newapp/src/Main.elm')
11
12   let g:executable = ale#path#Simplify(g:dir . '/../test-files/elm/newapp/node_modules/.bin/elm')
13
14   AssertLinterCwd ale#path#Simplify(g:dir . '/../test-files/elm/newapp')
15   AssertLinter g:executable,
16   \ ale#Escape(g:executable) . ' make --report=json --output=/dev/null %t'
17
18 Execute(should get elm-test executable for test code with elm >= 0.19):
19   call ale#test#SetFilename('../test-files/elm/newapp/tests/TestSuite.elm')
20
21   let g:executable = ale#path#Simplify(g:dir . '/../test-files/elm/newapp/node_modules/.bin/elm-test')
22
23   AssertLinterCwd ale#path#Simplify(g:dir . '/../test-files/elm/newapp')
24   AssertLinter g:executable,
25   \ ale#Escape(g:executable) . ' make --report=json --output=/dev/null --compiler '
26   \ . ale#path#Simplify(g:dir . '/../test-files/elm/newapp/node_modules/.bin/elm') . ' %t'
27
28 Execute(should fallback to elm executable with elm >= 0.19):
29   call ale#test#SetFilename('../test-files/elm/newapp-notests/tests/TestMain.elm')
30
31   let g:executable = ale#path#Simplify(g:dir . '/../test-files/elm/newapp-notests/node_modules/.bin/elm')
32
33   AssertLinterCwd ale#path#Simplify(g:dir . '/../test-files/elm/newapp-notests')
34   AssertLinter g:executable,
35   \ ale#Escape(g:executable) . ' make --report=json --output=/dev/null %t'
36
37 Execute(should get plain elm executable for test code with elm < 0.19):
38   call ale#test#SetFilename('../test-files/elm/oldapp/tests/TestSuite.elm')
39
40   let g:executable = ale#path#Simplify(g:dir . '/../test-files/elm/oldapp/node_modules/.bin/elm')
41
42   AssertLinterCwd ale#path#Simplify(g:dir . '/../test-files/elm/oldapp')
43   AssertLinter g:executable,
44   \ ale#Escape(g:executable) . ' make --report=json --output=/dev/null %t'
45
46 Execute(should get valid executable with 'use_global' params):
47   let g:ale_elm_make_use_global = 1
48
49   call ale#test#SetFilename('../test-files/elm/newapp/src/Main.elm')
50
51   AssertLinterCwd ale#path#Simplify(g:dir . '/../test-files/elm/newapp')
52   AssertLinter 'elm',
53   \ ale#Escape('elm') . ' make --report=json --output=/dev/null %t'
54
55 Execute(should get valid executable with 'use_global' and 'executable' params):
56   let g:ale_elm_make_executable = 'other-elm'
57   let g:ale_elm_make_use_global = 1
58
59   call ale#test#SetFilename('../test-files/elm/newapp/src/Main.elm')
60
61   AssertLinterCwd ale#path#Simplify(g:dir . '/../test-files/elm/newapp')
62   AssertLinter 'other-elm',
63   \ ale#Escape('other-elm') . ' make --report=json --output=/dev/null %t'