Mercurial > vim
view src/testdir/test_scriptnames.vim @ 25895:8e9864b98846 v8.2.3481
patch 8.2.3481: failures when char is unsigned
Commit: https://github.com/vim/vim/commit/2e258bd79f403bcccb1336bea70803957a83808f
Author: James McCoy <jamessan@jamessan.com>
Date: Tue Oct 5 19:44:04 2021 +0100
patch 8.2.3481: failures when char is unsigned
Problem: Failures when char is unsigned.
Solution: Use int8_T. Make a CI run with unsigned char. (James McCoy,
closes #8936)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Tue, 05 Oct 2021 20:45:03 +0200 |
parents | 08940efa6b4e |
children | fa09602eae48 |
line wrap: on
line source
" Test for :scriptnames 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') endfunc " vim: shiftwidth=2 sts=2 expandtab