summaryrefslogtreecommitdiff
path: root/test/completion/test_completion_prefixes.vader
blob: 0b2cfeaf0bddc4fa3459b207df1211f8acc15eae (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
Given typescript():
  let abc = y.
  let foo = ab
  let foo = (ab)
  let string1 = '
  let string2 = "

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 should be done after strings in TypeScript):
  AssertEqual '''', ale#completion#GetPrefix(&filetype, 4, 16)
  AssertEqual '"', ale#completion#GetPrefix(&filetype, 5, 16)

Execute(Completion prefixes should work for other filetypes):
  AssertEqual 'ab', ale#completion#GetPrefix('xxxyyyzzz', 3, 14)

Execute(Completion prefixes should work for other filetypes):
  AssertEqual 'ab', ale#completion#GetPrefix('xxxyyyzzz', 3, 14)

Given rust():
  let abc = y.
  let abc = String::
  let foo = (ab)

Execute(Completion should be done after dots in Rust):
  AssertEqual '.', ale#completion#GetPrefix(&filetype, 1, 13)

Execute(Completion should be done after colons in Rust):
  AssertEqual '::', ale#completion#GetPrefix(&filetype, 2, 19)

Execute(Completion should be done after words in parens in Rust):
  AssertEqual 'ab', ale#completion#GetPrefix(&filetype, 3, 14)

Execute(Completion should not be done after parens in Rust):
  AssertEqual '', ale#completion#GetPrefix(&filetype, 3, 15)