comparison src/testdir/test_gui.vim @ 28171:b4c111ea83b1 v8.2.4611

patch 8.2.4611: typos in tests; one lua line not covered by test Commit: https://github.com/vim/vim/commit/81b573d7e55bd48988f298ce8e652d902e9bdeba Author: Dominique Pelle <dominique.pelle@gmail.com> Date: Tue Mar 22 21:14:55 2022 +0000 patch 8.2.4611: typos in tests; one lua line not covered by test Problem: Typos in tests; one lua line not covered by test. Solution: Fix typos. Add test case. (Dominique Pell?, closes https://github.com/vim/vim/issues/9994)
author Bram Moolenaar <Bram@vim.org>
date Tue, 22 Mar 2022 22:30:03 +0100
parents fc34d6c4a42c
children 4190b932e6ca
comparison
equal deleted inserted replaced
28170:e882a67c742e 28171:b4c111ea83b1
272 " Multiline support 272 " Multiline support
273 if has('balloon_multiline') 273 if has('balloon_multiline')
274 " Multiline balloon using NL 274 " Multiline balloon using NL
275 new 275 new
276 func MyBalloonFuncForMultilineUsingNL() 276 func MyBalloonFuncForMultilineUsingNL()
277 return "Multiline\nSuppported\nBalloon\nusing NL" 277 return "Multiline\nSupported\nBalloon\nusing NL"
278 endfunc 278 endfunc
279 setl balloonexpr=MyBalloonFuncForMultilineUsingNL() 279 setl balloonexpr=MyBalloonFuncForMultilineUsingNL()
280 setl ballooneval 280 setl ballooneval
281 call assert_equal('MyBalloonFuncForMultilineUsingNL()', &balloonexpr) 281 call assert_equal('MyBalloonFuncForMultilineUsingNL()', &balloonexpr)
282 " TODO Read non-empty text, place the pointer at a character of a word, 282 " TODO Read non-empty text, place the pointer at a character of a word,
287 bwipe! 287 bwipe!
288 288
289 " Multiline balloon using List 289 " Multiline balloon using List
290 new 290 new
291 func MyBalloonFuncForMultilineUsingList() 291 func MyBalloonFuncForMultilineUsingList()
292 return [ 'Multiline', 'Suppported', 'Balloon', 'using List' ] 292 return [ 'Multiline', 'Supported', 'Balloon', 'using List' ]
293 endfunc 293 endfunc
294 setl balloonexpr=MyBalloonFuncForMultilineUsingList() 294 setl balloonexpr=MyBalloonFuncForMultilineUsingList()
295 setl ballooneval 295 setl ballooneval
296 call assert_equal('MyBalloonFuncForMultilineUsingList()', &balloonexpr) 296 call assert_equal('MyBalloonFuncForMultilineUsingList()', &balloonexpr)
297 " TODO Read non-empty text, place the pointer at a character of a word, 297 " TODO Read non-empty text, place the pointer at a character of a word,
1451 call cursor(1, 1) 1451 call cursor(1, 1)
1452 let args = #{find_text: 'two', repl_text: 'TWO', flags: 0xC, forward: 1} 1452 let args = #{find_text: 'two', repl_text: 'TWO', flags: 0xC, forward: 1}
1453 call test_gui_event('findrepl', args) 1453 call test_gui_event('findrepl', args)
1454 call assert_equal(['ONE TWO ONE', 'Twoo ONE TWO ONEo'], getline(1, '$')) 1454 call assert_equal(['ONE TWO ONE', 'Twoo ONE TWO ONEo'], getline(1, '$'))
1455 1455
1456 " Find next occurance of a string (in a find dialog) 1456 " Find next occurrence of a string (in a find dialog)
1457 call cursor(1, 11) 1457 call cursor(1, 11)
1458 let args = #{find_text: 'TWO', repl_text: '', flags: 0x11, forward: 1} 1458 let args = #{find_text: 'TWO', repl_text: '', flags: 0x11, forward: 1}
1459 call test_gui_event('findrepl', args) 1459 call test_gui_event('findrepl', args)
1460 call assert_equal([2, 10], [line('.'), col('.')]) 1460 call assert_equal([2, 10], [line('.'), col('.')])
1461 1461
1462 " Find previous occurances of a string (in a find dialog) 1462 " Find previous occurrences of a string (in a find dialog)
1463 call cursor(1, 11) 1463 call cursor(1, 11)
1464 let args = #{find_text: 'TWO', repl_text: '', flags: 0x11, forward: 0} 1464 let args = #{find_text: 'TWO', repl_text: '', flags: 0x11, forward: 0}
1465 call test_gui_event('findrepl', args) 1465 call test_gui_event('findrepl', args)
1466 call assert_equal([1, 5], [line('.'), col('.')]) 1466 call assert_equal([1, 5], [line('.'), col('.')])
1467 1467
1468 " Find next occurance of a string (in a replace dialog) 1468 " Find next occurrence of a string (in a replace dialog)
1469 call cursor(1, 1) 1469 call cursor(1, 1)
1470 let args = #{find_text: 'Twoo', repl_text: '', flags: 0x2, forward: 1} 1470 let args = #{find_text: 'Twoo', repl_text: '', flags: 0x2, forward: 1}
1471 call test_gui_event('findrepl', args) 1471 call test_gui_event('findrepl', args)
1472 call assert_equal([2, 1], [line('.'), col('.')]) 1472 call assert_equal([2, 1], [line('.'), col('.')])
1473 1473
1474 " Replace only the next occurance of a string (once) 1474 " Replace only the next occurrence of a string (once)
1475 call cursor(1, 5) 1475 call cursor(1, 5)
1476 let args = #{find_text: 'TWO', repl_text: 'two', flags: 0x3, forward: 1} 1476 let args = #{find_text: 'TWO', repl_text: 'two', flags: 0x3, forward: 1}
1477 call test_gui_event('findrepl', args) 1477 call test_gui_event('findrepl', args)
1478 call assert_equal(['ONE two ONE', 'Twoo ONE TWO ONEo'], getline(1, '$')) 1478 call assert_equal(['ONE two ONE', 'Twoo ONE TWO ONEo'], getline(1, '$'))
1479 1479