diff options
author | w0rp <devw0rp@gmail.com> | 2017-02-13 23:31:29 +0000 |
---|---|---|
committer | w0rp <devw0rp@gmail.com> | 2017-02-13 23:31:29 +0000 |
commit | f39e88cfa8d81d54e65ae05678fbfb735f793828 (patch) | |
tree | 3d9ee89df00d67beaca41d14f531786fcde2f663 /test/test_statusline_api_without_globals.vader | |
parent | c0814934af98c47cdfcd3c4e7a290cef30f1a4a0 (diff) | |
download | ale-f39e88cfa8d81d54e65ae05678fbfb735f793828.zip |
#274 - Fix airline integration when ALE is not loaded fully
Diffstat (limited to 'test/test_statusline_api_without_globals.vader')
-rw-r--r-- | test/test_statusline_api_without_globals.vader | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/test/test_statusline_api_without_globals.vader b/test/test_statusline_api_without_globals.vader new file mode 100644 index 00000000..29677f3b --- /dev/null +++ b/test/test_statusline_api_without_globals.vader @@ -0,0 +1,19 @@ +" This file tests that statusline functions return meaningful output even +" when most of ALE itself has not been loaded. +" +" This is important for plugins which integrate with ALE like airline. + +Before: + unlet! g:ale_buffer_info + +After: + let g:ale_buffer_info = {} + +Execute(ale#statusline#Update shouldn't blow up when globals are undefined): + call ale#statusline#Update(1, []) + +Execute(ale#statusline#Count should return 0 counts when globals are undefined): + AssertEqual [0, 0], ale#statusline#Count(1) + +Execute(ale#statusline#Status should return 'OK' when globals are undefined): + AssertEqual 'OK', ale#statusline#Status() |