Mercurial > vim
view src/testdir/test_escaped_glob.vim @ 18621:a9bfdc5ea1ec v8.1.2303
patch 8.1.2303: cursor in wrong position after horizontal scroll
Commit: https://github.com/vim/vim/commit/08f23636aef595f4cc061dfee8248dca97df16b3
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Nov 16 14:19:33 2019 +0100
patch 8.1.2303: cursor in wrong position after horizontal scroll
Problem: Cursor in wrong position after horizontal scroll.
Solution: Set w_valid_leftcol. (closes https://github.com/vim/vim/issues/5214, closes https://github.com/vim/vim/issues/5224)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 16 Nov 2019 14:30:03 +0100 |
parents | 9fac6d0de69a |
children | e373843e2980 |
line wrap: on
line source
" Test whether glob()/globpath() return correct results with certain escaped " characters. function SetUp() " consistent sorting of file names set nofileignorecase endfunction function Test_glob() if !has('unix') " This test fails on Windows because of the special characters in the " filenames. Disable the test on non-Unix systems for now. return endif " Execute these commands in the sandbox, so that using the shell fails. " Setting 'shell' to an invalid name causes a memory leak. sandbox call assert_equal("", glob('Xxx\{')) sandbox call assert_equal("", 'Xxx\$'->glob()) w! Xxx\{ w! Xxx\$ sandbox call assert_equal("Xxx{", glob('Xxx\{')) sandbox call assert_equal("Xxx$", glob('Xxx\$')) call delete('Xxx{') call delete('Xxx$') endfunction function Test_globpath() sandbox call assert_equal("sautest/autoload/globone.vim\nsautest/autoload/globtwo.vim", \ globpath('sautest/autoload', 'glob*.vim')) sandbox call assert_equal(['sautest/autoload/globone.vim', 'sautest/autoload/globtwo.vim'], \ 'glob*.vim'->globpath('sautest/autoload', 0, 1)) endfunction