summaryrefslogtreecommitdiff
path: root/test/test_balloon_messages.vader
diff options
context:
space:
mode:
authorw0rp <devw0rp@gmail.com>2017-05-31 22:04:33 +0100
committerw0rp <devw0rp@gmail.com>2017-05-31 22:04:33 +0100
commit735a6a2a885d8c5581a19f16998b4b6209742bd5 (patch)
tree2491953f638693e1a9825bb01052fe555f8db742 /test/test_balloon_messages.vader
parent5e4c302b5bfd916214865c3c3d3808c75d137932 (diff)
downloadale-735a6a2a885d8c5581a19f16998b4b6209742bd5.zip
Fix #537 - Add support for balloons
Diffstat (limited to 'test/test_balloon_messages.vader')
-rw-r--r--test/test_balloon_messages.vader38
1 files changed, 38 insertions, 0 deletions
diff --git a/test/test_balloon_messages.vader b/test/test_balloon_messages.vader
new file mode 100644
index 00000000..50dc6af4
--- /dev/null
+++ b/test/test_balloon_messages.vader
@@ -0,0 +1,38 @@
+Before:
+ Save g:ale_buffer_info
+
+ let g:ale_buffer_info[347] = {'loclist': [
+ \ {
+ \ 'lnum': 1,
+ \ 'col': 10,
+ \ 'text': 'Missing semicolon. (semi)',
+ \ },
+ \ {
+ \ 'lnum': 2,
+ \ 'col': 10,
+ \ 'text': 'Infix operators must be spaced. (space-infix-ops)'
+ \ },
+ \ {
+ \ 'lnum': 2,
+ \ 'col': 15,
+ \ 'text': 'Missing radix parameter (radix)'
+ \ },
+ \]}
+
+After:
+ Restore
+
+Execute(Balloon messages should be shown for the correct lines):
+ AssertEqual
+ \ 'Missing semicolon. (semi)',
+ \ ale#balloon#MessageForPos(347, 1, 1)
+
+Execute(Balloon messages should be shown for earlier columns):
+ AssertEqual
+ \ 'Infix operators must be spaced. (space-infix-ops)',
+ \ ale#balloon#MessageForPos(347, 2, 1)
+
+Execute(Balloon messages should be shown for later columns):
+ AssertEqual
+ \ 'Missing radix parameter (radix)',
+ \ ale#balloon#MessageForPos(347, 2, 16)