Mercurial > vim
comparison src/testdir/test_spell.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 | ea16b081493d |
children | c61a9d832537 |
comparison
equal
deleted
inserted
replaced
30768:97a37fa9b03c | 30769:ae10b91ac6b3 |
---|---|
760 | 760 |
761 "Test with SAL instead of SOFO items; test automatic reloading | 761 "Test with SAL instead of SOFO items; test automatic reloading |
762 func Test_zz_sal_and_addition() | 762 func Test_zz_sal_and_addition() |
763 set enc=latin1 | 763 set enc=latin1 |
764 set spellfile= | 764 set spellfile= |
765 call writefile(g:test_data_dic1, "Xtest.dic") | 765 call writefile(g:test_data_dic1, "Xtest.dic", 'D') |
766 call writefile(g:test_data_aff_sal, "Xtest.aff") | 766 call writefile(g:test_data_aff_sal, "Xtest.aff", 'D') |
767 mkspell! Xtest Xtest | 767 mkspell! Xtest Xtest |
768 set spl=Xtest.latin1.spl spell | 768 set spl=Xtest.latin1.spl spell |
769 call assert_equal('kbltykk', soundfold('goobledygoook')) | 769 call assert_equal('kbltykk', soundfold('goobledygoook')) |
770 call assert_equal('kprnfn', soundfold('kóopërÿnôven')) | 770 call assert_equal('kprnfn', soundfold('kóopërÿnôven')) |
771 call assert_equal('*fls kswts tl', soundfold('oeverloos gezwets edale')) | 771 call assert_equal('*fls kswts tl', soundfold('oeverloos gezwets edale')) |
772 | 772 |
773 "also use an addition file | 773 "also use an addition file |
774 call writefile(["/regions=usgbnz", "elequint/2", "elekwint/3"], "Xtest.latin1.add") | 774 call writefile(["/regions=usgbnz", "elequint/2", "elekwint/3"], "Xtest.latin1.add", 'D') |
775 mkspell! Xtest.latin1.add.spl Xtest.latin1.add | 775 mkspell! Xtest.latin1.add.spl Xtest.latin1.add |
776 | 776 |
777 bwipe! | 777 bwipe! |
778 call setline(1, ["start: elequint test elekwint test elekwent asdf"]) | 778 call setline(1, ["start: elequint test elekwint test elekwent asdf"]) |
779 | 779 |
806 set spellfile=Xdir/Xtest.utf-8.add,Xtest_other.add | 806 set spellfile=Xdir/Xtest.utf-8.add,Xtest_other.add |
807 endfunc | 807 endfunc |
808 | 808 |
809 func Test_region_error() | 809 func Test_region_error() |
810 messages clear | 810 messages clear |
811 call writefile(["/regions=usgbnz", "elequint/0"], "Xtest.latin1.add") | 811 call writefile(["/regions=usgbnz", "elequint/0"], "Xtest.latin1.add", 'D') |
812 mkspell! Xtest.latin1.add.spl Xtest.latin1.add | 812 mkspell! Xtest.latin1.add.spl Xtest.latin1.add |
813 call assert_match('Invalid region nr in Xtest.latin1.add line 2: 0', execute('messages')) | 813 call assert_match('Invalid region nr in Xtest.latin1.add line 2: 0', execute('messages')) |
814 call delete('Xtest.latin1.add') | |
815 call delete('Xtest.latin1.add.spl') | 814 call delete('Xtest.latin1.add.spl') |
816 endfunc | 815 endfunc |
817 | 816 |
818 " Check using z= in new buffer (crash fixed by patch 7.4a.028). | 817 " Check using z= in new buffer (crash fixed by patch 7.4a.028). |
819 func Test_zeq_crash() | 818 func Test_zeq_crash() |