summaryrefslogtreecommitdiff
path: root/src/testdir/test_python3.vim
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2019-03-30 12:33:13 +0100
committerBram Moolenaar <Bram@vim.org>2019-03-30 12:33:13 +0100
commitbfd36036700ab2d4c9de48e37f222f4a4dd7b3b0 (patch)
tree9bf95e2b4970aa3beadb12c618ac4389167f9e9f /src/testdir/test_python3.vim
parente73f911c53de1c87e39456ba20782f72a0ca8f4f (diff)
downloadvim-git-bfd36036700ab2d4c9de48e37f222f4a4dd7b3b0.tar.gz
patch 8.1.1074: Python test doesn't wipe out hidden bufferv8.1.1074
Problem: Python test doesn't wipe out hidden buffer. Solution: Wipe out the buffer. (Ben Jackson, closes #4189)
Diffstat (limited to 'src/testdir/test_python3.vim')
-rw-r--r--src/testdir/test_python3.vim13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/testdir/test_python3.vim b/src/testdir/test_python3.vim
index bc05f68ce..514661ee2 100644
--- a/src/testdir/test_python3.vim
+++ b/src/testdir/test_python3.vim
@@ -89,32 +89,37 @@ func _SetUpHiddenBuffer()
call assert_equal( line( '.' ), 11 )
endfunc
+func _CleanUpHiddenBuffer()
+ bwipe! hidden
+ bwipe!
+endfunc
+
func Test_Write_To_HiddenBuffer_Does_Not_Fix_Cursor_Clear()
call _SetUpHiddenBuffer()
py3 vim.buffers[ int( vim.eval( 'bufnr("hidden")' ) ) ][:] = None
call assert_equal( line( '.' ), 11 )
- bwipe!
+ call _CleanUpHiddenBuffer()
endfunc
func Test_Write_To_HiddenBuffer_Does_Not_Fix_Cursor_List()
call _SetUpHiddenBuffer()
py3 vim.buffers[ int( vim.eval( 'bufnr("hidden")' ) ) ][:] = [ 'test' ]
call assert_equal( line( '.' ), 11 )
- bwipe!
+ call _CleanUpHiddenBuffer()
endfunc
func Test_Write_To_HiddenBuffer_Does_Not_Fix_Cursor_Str()
call _SetUpHiddenBuffer()
py3 vim.buffers[ int( vim.eval( 'bufnr("hidden")' ) ) ][0] = 'test'
call assert_equal( line( '.' ), 11 )
- bwipe!
+ call _CleanUpHiddenBuffer()
endfunc
func Test_Write_To_HiddenBuffer_Does_Not_Fix_Cursor_ClearLine()
call _SetUpHiddenBuffer()
py3 vim.buffers[ int( vim.eval( 'bufnr("hidden")' ) ) ][0] = None
call assert_equal( line( '.' ), 11 )
- bwipe!
+ call _CleanUpHiddenBuffer()
endfunc
func _SetUpVisibleBuffer()