Skip to content

Commit c9b6a50

Browse files
committed
test: del vim.current.line
1 parent bfb5c26 commit c9b6a50

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

test/test_vim.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,15 @@ def test_current_line(vim):
7474
assert vim.current.line == 'abc'
7575

7676

77+
def test_current_line_delete(vim):
78+
vim.current.buffer[:] = ['one', 'two']
79+
assert len(vim.current.buffer[:]) == 2
80+
del vim.current.line
81+
assert len(vim.current.buffer[:]) == 1 and vim.current.buffer[0] == 'two'
82+
del vim.current.line
83+
assert len(vim.current.buffer[:]) == 1 and not vim.current.buffer[0]
84+
85+
7786
def test_vars(vim):
7887
vim.vars['python'] = [1, 2, {'3': 1}]
7988
assert vim.vars['python'], [1, 2 == {'3': 1}]

0 commit comments

Comments
 (0)