comparison src/testdir/test_syntax.vim @ 30769:ae10b91ac6b3 v9.0.0719

patch 9.0.0719: too many delete() calls in tests Commit: https://github.com/vim/vim/commit/56564964e6d0956c29687e8a10cb94fe42f5c097 Author: Bram Moolenaar <Bram@vim.org> Date: Mon Oct 10 22:39:42 2022 +0100 patch 9.0.0719: too many delete() calls in tests Problem: Too many delete() calls in tests. Solution: Use deferred delete where possible.
author Bram Moolenaar <Bram@vim.org>
date Mon, 10 Oct 2022 23:45:04 +0200
parents 80929331a836
children 97bb0811cfd4
comparison
equal deleted inserted replaced
30768:97a37fa9b03c 30769:ae10b91ac6b3
650 \ "\tfor (int i = 0; i < count; ++i) {", 650 \ "\tfor (int i = 0; i < count; ++i) {",
651 \ "\t break;", 651 \ "\t break;",
652 \ "\t}", 652 \ "\t}",
653 \ "\tNote: asdf", 653 \ "\tNote: asdf",
654 \ '}', 654 \ '}',
655 \ ], 'Xtest.c') 655 \ ], 'Xtest.c', 'D')
656 656
657 " This makes the default for 'background' use "dark", check that the 657 " This makes the default for 'background' use "dark", check that the
658 " response to t_RB corrects it to "light". 658 " response to t_RB corrects it to "light".
659 let $COLORFGBG = '15;0' 659 let $COLORFGBG = '15;0'
660 660
668 668
669 call term_sendkeys(buf, "\<Esc>") 669 call term_sendkeys(buf, "\<Esc>")
670 call StopVimInTerminal(buf) 670 call StopVimInTerminal(buf)
671 671
672 let $COLORFGBG = '' 672 let $COLORFGBG = ''
673 call delete('Xtest.c')
674 endfun 673 endfun
675 674
676 " Test \z(...) along with \z1 675 " Test \z(...) along with \z1
677 func Test_syn_zsub() 676 func Test_syn_zsub()
678 new 677 new
702 call test_override("ALL", 0) 701 call test_override("ALL", 0)
703 bwipe! 702 bwipe!
704 endfunc 703 endfunc
705 704
706 func Test_syntax_after_bufdo() 705 func Test_syntax_after_bufdo()
707 call writefile(['/* aaa comment */'], 'Xaaa.c') 706 call writefile(['/* aaa comment */'], 'Xaaa.c', 'D')
708 call writefile(['/* bbb comment */'], 'Xbbb.c') 707 call writefile(['/* bbb comment */'], 'Xbbb.c', 'D')
709 call writefile(['/* ccc comment */'], 'Xccc.c') 708 call writefile(['/* ccc comment */'], 'Xccc.c', 'D')
710 call writefile(['/* ddd comment */'], 'Xddd.c') 709 call writefile(['/* ddd comment */'], 'Xddd.c', 'D')
711 710
712 let bnr = bufnr('%') 711 let bnr = bufnr('%')
713 new Xaaa.c 712 new Xaaa.c
714 badd Xbbb.c 713 badd Xbbb.c
715 badd Xccc.c 714 badd Xccc.c
733 bwipe! Xaaa.c 732 bwipe! Xaaa.c
734 bwipe! Xbbb.c 733 bwipe! Xbbb.c
735 bwipe! Xccc.c 734 bwipe! Xccc.c
736 bwipe! Xddd.c 735 bwipe! Xddd.c
737 syntax off 736 syntax off
738 call delete('Xaaa.c')
739 call delete('Xbbb.c')
740 call delete('Xccc.c')
741 call delete('Xddd.c')
742 endfunc 737 endfunc
743 738
744 func Test_syntax_foldlevel() 739 func Test_syntax_foldlevel()
745 new 740 new
746 call setline(1, [ 741 call setline(1, [