Mercurial > vim
view src/testdir/test_escaped_glob.vim @ 23211:96a72f1f6c0c v8.2.2151
patch 8.2.2151: $dir not expanded when configure checks for moonjit
Commit: https://github.com/vim/vim/commit/a79a8944dade9115ccaa5a06a076dfb257e56c62
Author: Bram Moolenaar <Bram@vim.org>
Date: Thu Dec 17 20:50:25 2020 +0100
patch 8.2.2151: $dir not expanded when configure checks for moonjit
Problem: $dir not expanded when configure checks for moonjit.
Solution: Use double quotes instead of single quotes. (closes https://github.com/vim/vim/issues/7478)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Thu, 17 Dec 2020 21:00:05 +0100 |
parents | 08940efa6b4e |
children |
line wrap: on
line source
" Test whether glob()/globpath() return correct results with certain escaped " characters. source check.vim func SetUp() " consistent sorting of file names set nofileignorecase endfunction function Test_glob() " This test fails on Windows because of the special characters in the " filenames. Disable the test on non-Unix systems for now. CheckUnix " 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 " vim: shiftwidth=2 sts=2 expandtab