Skip to content

Commit 55e4302

Browse files
committed
test: add test for filetype exclusion
1 parent 1c2e65e commit 55e4302

File tree

2 files changed

+65
-0
lines changed

2 files changed

+65
-0
lines changed
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
--|---------|---------|---------|---------|---------|---------|---------|---------|
2+
01|123
3+
02|456
4+
03|7
5+
04|~
6+
05|~
7+
06|~
8+
07|~
9+
08|~
10+
09|~
11+
10|~
12+
11|~
13+
12|~
14+
13|~
15+
14|~
16+
15|~
17+
16|~
18+
17|~
19+
18|~
20+
19|~
21+
20|~
22+
21|~
23+
22|~
24+
23|[No Name] [+] 3,2 All
25+
24|-- INSERT --
26+
27+
--|---------|---------|---------|---------|---------|---------|---------|---------|
28+
01|00000000000000000000000000000000000000000000000000000000000000000000000000000000
29+
02|00000000000000000000000000000000000000000000000000000000000000000000000000000000
30+
03|00000000000000000000000000000000000000000000000000000000000000000000000000000000
31+
04|11111111111111111111111111111111111111111111111111111111111111111111111111111111
32+
05|11111111111111111111111111111111111111111111111111111111111111111111111111111111
33+
06|11111111111111111111111111111111111111111111111111111111111111111111111111111111
34+
07|11111111111111111111111111111111111111111111111111111111111111111111111111111111
35+
08|11111111111111111111111111111111111111111111111111111111111111111111111111111111
36+
09|11111111111111111111111111111111111111111111111111111111111111111111111111111111
37+
10|11111111111111111111111111111111111111111111111111111111111111111111111111111111
38+
11|11111111111111111111111111111111111111111111111111111111111111111111111111111111
39+
12|11111111111111111111111111111111111111111111111111111111111111111111111111111111
40+
13|11111111111111111111111111111111111111111111111111111111111111111111111111111111
41+
14|11111111111111111111111111111111111111111111111111111111111111111111111111111111
42+
15|11111111111111111111111111111111111111111111111111111111111111111111111111111111
43+
16|11111111111111111111111111111111111111111111111111111111111111111111111111111111
44+
17|11111111111111111111111111111111111111111111111111111111111111111111111111111111
45+
18|11111111111111111111111111111111111111111111111111111111111111111111111111111111
46+
19|11111111111111111111111111111111111111111111111111111111111111111111111111111111
47+
20|11111111111111111111111111111111111111111111111111111111111111111111111111111111
48+
21|11111111111111111111111111111111111111111111111111111111111111111111111111111111
49+
22|11111111111111111111111111111111111111111111111111111111111111111111111111111111
50+
23|22222222222222222222222222222222222222222222222222222222222222222222222222222222
51+
24|33333333333344444444444444444444444444444444444444444444444444444444444444444444

tests/test_client.lua

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,4 +171,18 @@ T["client()"]["suggestions work when attaching to second buffer in a row"] = fun
171171
reference_screenshot(child.get_screenshot(), nil, { ignore_text = { 9, 10 }, ignore_attr = { 9, 10 } })
172172
end
173173

174+
T["client()"]["will not attach to buffer due to filetype exclusion"] = function()
175+
child.config.filetypes = [[
176+
["*"] = false,
177+
]]
178+
179+
child.config.suggestion = child.config.suggestion .. "auto_trigger = true,"
180+
181+
child.configure_copilot()
182+
child.type_keys("i123", "<Esc>", "o456", "<Esc>", "o7")
183+
child.wait_for_suggestion()
184+
185+
reference_screenshot(child.get_screenshot(), nil, { ignore_text = { 9, 10 }, ignore_attr = { 9, 10 } })
186+
end
187+
174188
return T

0 commit comments

Comments
 (0)