Mercurial > vim
view src/testdir/test_scriptnames.vim @ 29812:68ef14b21d01 v9.0.0245
patch 9.0.0245: mechanism to prevent recursive screen updating is incomplete
Commit: https://github.com/vim/vim/commit/471c0fa3eed4f6207d1cb7636970547bfd2eee26
Author: Bram Moolenaar <Bram@vim.org>
Date: Mon Aug 22 15:19:16 2022 +0100
patch 9.0.0245: mechanism to prevent recursive screen updating is incomplete
Problem: Mechanism to prevent recursive screen updating is incomplete.
Solution: Add "redraw_not_allowed" and set it in build_stl_str_hl().
(issue #10952)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Mon, 22 Aug 2022 16:30:03 +0200 |
parents | 761631155a90 |
children | 8dca33bca038 |
line wrap: on
line source
" Test for the :scriptnames command func Test_scriptnames() call writefile(['let did_load_script = 123'], 'Xscripting') source Xscripting call assert_equal(123, g:did_load_script) let scripts = split(execute('scriptnames'), "\n") let last = scripts[-1] call assert_match('\<Xscripting\>', last) let lastnr = substitute(last, '\D*\(\d\+\):.*', '\1', '') exe 'script ' . lastnr call assert_equal('Xscripting', expand('%:t')) call assert_fails('script ' . (lastnr + 1), 'E474:') call assert_fails('script 0', 'E939:') new call setline(1, 'nothing') call assert_fails('script ' . lastnr, 'E37:') exe 'script! ' . lastnr call assert_equal('Xscripting', expand('%:t')) bwipe call delete('Xscripting') let msgs = execute('messages') scriptnames call assert_equal(msgs, execute('messages')) endfunc " Test for the getscriptinfo() function func Test_getscriptinfo() call writefile(['let loaded_script_id = expand("<SID>")'], 'Xscript') source Xscript let l = getscriptinfo() call assert_match('Xscript$', l[-1].name) call assert_equal(g:loaded_script_id, $"<SNR>{l[-1].sid}_") call delete('Xscript') endfunc " vim: shiftwidth=2 sts=2 expandtab