Skip to content

Commit 5e0ecb3

Browse files
committed
Three more indent tests, two failing.
1 parent 27bfc20 commit 5e0ecb3

File tree

1 file changed

+54
-0
lines changed

1 file changed

+54
-0
lines changed

spec/indent_spec.lua

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,42 @@ describe('indent', function()
191191
end)
192192
)
193193

194+
it(
195+
'dedents after double indented type with braces in tactic mode',
196+
helpers.clean_buffer(
197+
[[
198+
theorem foo :
199+
bar {(n : ℤ)} = baz := by
200+
]],
201+
function()
202+
helpers.feed 'Gobaz'
203+
assert.contents.are [[
204+
theorem foo :
205+
bar {(n : ℤ)} = baz := by
206+
baz
207+
]]
208+
end
209+
)
210+
)
211+
212+
it(
213+
'dedents after double indented type with braces in term mode',
214+
helpers.clean_buffer(
215+
[[
216+
theorem foo :
217+
bar {(n : ℤ)} = baz :=
218+
]],
219+
function()
220+
helpers.feed 'Gobaz'
221+
assert.contents.are [[
222+
theorem foo :
223+
bar {(n : ℤ)} = baz :=
224+
baz
225+
]]
226+
end
227+
)
228+
)
229+
194230
it(
195231
'indents inside anonymous literals',
196232
helpers.clean_buffer(
@@ -209,6 +245,24 @@ describe('indent', function()
209245
)
210246
)
211247

248+
it(
249+
'indents again after by at focused stuff',
250+
helpers.clean_buffer(
251+
[[
252+
theorem foo : 37 = 37 := by
253+
· have : 37 = 37 := by
254+
]],
255+
function()
256+
helpers.feed 'Gosorry'
257+
assert.contents.are [[
258+
theorem foo : 37 = 37 := by
259+
· have : 37 = 37 := by
260+
sorry
261+
]]
262+
end
263+
)
264+
)
265+
212266
for each in fixtures.indent() do
213267
it(each.description, function()
214268
vim.cmd.edit { each.unindented, bang = true }

0 commit comments

Comments
 (0)