summaryrefslogtreecommitdiff
path: root/test/completion/test_completion_prefixes.vader
diff options
context:
space:
mode:
authorw0rp <devw0rp@gmail.com>2017-11-26 12:24:18 +0000
committerw0rp <devw0rp@gmail.com>2017-11-26 12:24:18 +0000
commitb1a6abdda6f23ba314799f21c04d30e3411cebc7 (patch)
tree88a989835523ada49b909586031953f37b2f0af1 /test/completion/test_completion_prefixes.vader
parent2e50aadd56966c42cf82befaa7e4a3bac284581a (diff)
downloadale-b1a6abdda6f23ba314799f21c04d30e3411cebc7.zip
#1162 Add unfinished experimental code for supporting LSP completion, clean up the tests, and make the completion cancelling better
Diffstat (limited to 'test/completion/test_completion_prefixes.vader')
-rw-r--r--test/completion/test_completion_prefixes.vader19
1 files changed, 19 insertions, 0 deletions
diff --git a/test/completion/test_completion_prefixes.vader b/test/completion/test_completion_prefixes.vader
new file mode 100644
index 00000000..8ac29326
--- /dev/null
+++ b/test/completion/test_completion_prefixes.vader
@@ -0,0 +1,19 @@
+Given typescript():
+ let abc = y.
+ let foo = ab
+ let foo = (ab)
+
+Execute(Completion should be done after dots in TypeScript):
+ AssertEqual '.', ale#completion#GetPrefix(&filetype, 1, 13)
+
+Execute(Completion should be done after words in TypeScript):
+ AssertEqual 'ab', ale#completion#GetPrefix(&filetype, 2, 13)
+
+Execute(Completion should be done after words in parens in TypeScript):
+ AssertEqual 'ab', ale#completion#GetPrefix(&filetype, 3, 14)
+
+Execute(Completion should not be done after parens in TypeScript):
+ AssertEqual '', ale#completion#GetPrefix(&filetype, 3, 15)
+
+Execute(Completion prefixes should work for other filetypes):
+ AssertEqual 'ab', ale#completion#GetPrefix('xxxyyyzzz', 3, 14)