summaryrefslogtreecommitdiff
path: root/test/test_ale_info.vader
diff options
context:
space:
mode:
authorw0rp <devw0rp@gmail.com>2017-02-13 22:11:35 +0000
committerw0rp <devw0rp@gmail.com>2017-02-13 22:11:35 +0000
commit0589022c76f7b656ea90595150dbbb635e49b003 (patch)
treeece7162826a6c1c73a6f1bef88683a07f9275cef /test/test_ale_info.vader
parentf6bc73b749f28b31500716710429738afa9d6bc9 (diff)
downloadale-0589022c76f7b656ea90595150dbbb635e49b003.zip
Include most linter variables in ALEInfo
Diffstat (limited to 'test/test_ale_info.vader')
-rw-r--r--test/test_ale_info.vader50
1 files changed, 43 insertions, 7 deletions
diff --git a/test/test_ale_info.vader b/test/test_ale_info.vader
index f8172c0c..3a319e12 100644
--- a/test/test_ale_info.vader
+++ b/test/test_ale_info.vader
@@ -17,7 +17,9 @@ Execute (ALEInfo with no linters should return the right output):
AssertEqual "\n
\ Current Filetype: nolintersft\n
\Available Linters: []\n
- \ Enabled Linters: []", g:output
+ \ Enabled Linters: []\n
+ \ Linter Variables:\n
+ \", g:output
Given (Empty buffer with no filetype):
Execute (ALEInfo with no filetype should return the right output):
@@ -27,7 +29,9 @@ Execute (ALEInfo with no filetype should return the right output):
AssertEqual "\n
\ Current Filetype: \n
\Available Linters: []\n
- \ Enabled Linters: []", g:output
+ \ Enabled Linters: []\n
+ \ Linter Variables:\n
+ \", g:output
Given testft (Empty buffer):
Execute (ALEInfo with a single linter should return the right output):
@@ -38,7 +42,9 @@ Execute (ALEInfo with a single linter should return the right output):
AssertEqual "\n
\ Current Filetype: testft\n
\Available Linters: ['testlinter1']\n
- \ Enabled Linters: ['testlinter1']", g:output
+ \ Enabled Linters: ['testlinter1']\n
+ \ Linter Variables:\n
+ \", g:output
Given testft (Empty buffer):
Execute (ALEInfo with two linters should return the right output):
@@ -50,7 +56,9 @@ Execute (ALEInfo with two linters should return the right output):
AssertEqual "\n
\ Current Filetype: testft\n
\Available Linters: ['testlinter1', 'testlinter2']\n
- \ Enabled Linters: ['testlinter1', 'testlinter2']", g:output
+ \ Enabled Linters: ['testlinter1', 'testlinter2']\n
+ \ Linter Variables:\n
+ \", g:output
Given testft (Empty buffer):
Execute (ALEInfo should calculate enabled linters correctly):
@@ -63,7 +71,9 @@ Execute (ALEInfo should calculate enabled linters correctly):
AssertEqual "\n
\ Current Filetype: testft\n
\Available Linters: ['testlinter1', 'testlinter2']\n
- \ Enabled Linters: ['testlinter2']", g:output
+ \ Enabled Linters: ['testlinter2']\n
+ \ Linter Variables:\n
+ \", g:output
Given testft (Empty buffer):
Execute (ALEInfo should only return linters for current filetype):
@@ -75,7 +85,9 @@ Execute (ALEInfo should only return linters for current filetype):
AssertEqual "\n
\ Current Filetype: testft\n
\Available Linters: ['testlinter1']\n
- \ Enabled Linters: ['testlinter1']", g:output
+ \ Enabled Linters: ['testlinter1']\n
+ \ Linter Variables:\n
+ \", g:output
Given testft.testft2 (Empty buffer with two filetypes):
Execute (ALEInfo with compound filetypes should return linters for both of them):
@@ -87,5 +99,29 @@ Execute (ALEInfo with compound filetypes should return linters for both of them)
AssertEqual "\n
\ Current Filetype: testft.testft2\n
\Available Linters: ['testlinter1', 'testlinter2']\n
- \ Enabled Linters: ['testlinter1', 'testlinter2']", g:output
+ \ Enabled Linters: ['testlinter1', 'testlinter2']\n
+ \ Linter Variables:\n
+ \", g:output
+Given testft.testft2 (Empty buffer with two filetypes):
+Execute (ALEInfo should return appropriately named global variables):
+ let g:ale_testft_testlinter1_foo = 'abc'
+ let g:ale_testft_testlinter1_bar = ['abc']
+ let g:ale_testft2_testlinter2_foo = 123
+ let g:ale_testft2_testlinter2_bar = {'x': 'y'}
+
+ call ale#linter#Define('testft', g:testlinter1)
+ call ale#linter#Define('testft2', g:testlinter2)
+ redir => g:output
+ silent ALEInfo
+ redir END
+ AssertEqual "\n
+ \ Current Filetype: testft.testft2\n
+ \Available Linters: ['testlinter1', 'testlinter2']\n
+ \ Enabled Linters: ['testlinter1', 'testlinter2']\n
+ \ Linter Variables:\n
+ \\n
+ \let g:ale_testft2_testlinter2_bar = {'x': 'y'}\n
+ \let g:ale_testft2_testlinter2_foo = 123\n
+ \let g:ale_testft_testlinter1_bar = ['abc']\n
+ \let g:ale_testft_testlinter1_foo = 'abc'", g:output