diff src/testdir/test_popup.vim @ 17783:45eca7143d7c v8.1.1888

patch 8.1.1888: more functions can be used as methods commit https://github.com/vim/vim/commit/073e4b92e613d22ce7b16e0fbf5c0e40cb5f9b2c Author: Bram Moolenaar <Bram@vim.org> Date: Sun Aug 18 23:01:56 2019 +0200 patch 8.1.1888: more functions can be used as methods Problem: More functions can be used as methods. Solution: Make various functions usable as a method.
author Bram Moolenaar <Bram@vim.org>
date Sun, 18 Aug 2019 23:15:03 +0200
parents a7afcea6f40a
children f71ee7b04f0b
line wrap: on
line diff
--- a/src/testdir/test_popup.vim
+++ b/src/testdir/test_popup.vim
@@ -758,9 +758,8 @@ func Test_popup_and_previewwindow_dump()
 endfunc
 
 func Test_balloon_split()
-  if !exists('*balloon_split')
-    return
-  endif
+  CheckFunction balloon_split
+
   call assert_equal([
         \ 'tempname: 0x555555e380a0 "/home/mool/.viminfz.tmp"',
         \ ], balloon_split(
@@ -771,13 +770,14 @@ func Test_balloon_split()
         \ ], balloon_split(
         \ 'one two three four one two three four one two three four'))
 
-  call assert_equal([
-        \ 'struct = {',
-        \ '  one = 1,',
-        \ '  two = 2,',
-        \ '  three = 3}',
-        \ ], balloon_split(
-        \ 'struct = {one = 1, two = 2, three = 3}'))
+  eval 'struct = {one = 1, two = 2, three = 3}'
+        \ ->balloon_split()
+        \ ->assert_equal([
+        \   'struct = {',
+        \   '  one = 1,',
+        \   '  two = 2,',
+        \   '  three = 3}',
+        \ ])
 
   call assert_equal([
         \ 'struct = {',