diff options
author | Bram Moolenaar <Bram@vim.org> | 2017-07-11 21:46:28 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2017-07-11 21:46:28 +0200 |
commit | 292eff0c5aacb8531d65509679b6c29eae8dc22a (patch) | |
tree | 25bb79912395e8a0e1c219dfa32283f8bee8081e /src/testdir/test_escaped_glob.vim | |
parent | f1d13478e3a7e1a86d52552c8c5571f00dc28ad1 (diff) | |
download | vim-git-292eff0c5aacb8531d65509679b6c29eae8dc22a.tar.gz |
patch 8.0.0708: some tests are old stylev8.0.0708
Problem: Some tests are old style.
Solution: Change a few tests from old style to new style. (pschuh,
closes #1813)
Diffstat (limited to 'src/testdir/test_escaped_glob.vim')
-rw-r--r-- | src/testdir/test_escaped_glob.vim | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/testdir/test_escaped_glob.vim b/src/testdir/test_escaped_glob.vim new file mode 100644 index 000000000..6eca8bc71 --- /dev/null +++ b/src/testdir/test_escaped_glob.vim @@ -0,0 +1,25 @@ +" Test whether glob()/globpath() return correct results with certain escaped +" characters. + +function SetUp() + " make sure glob() doesn't use the shell + set shell=doesnotexist + " consistent sorting of file names + set nofileignorecase +endfunction + +function Test_glob() + call assert_equal("", glob('Xxx\{')) + call assert_equal("", glob('Xxx\$')) + w! Xxx{ + w! Xxx\$ + call assert_equal("Xxx{", glob('Xxx\{')) + call assert_equal("Xxx$", glob('Xxx\$')) +endfunction + +function Test_globpath() + call assert_equal("sautest/autoload/Test104.vim\nsautest/autoload/footest.vim", + \ globpath('sautest/autoload', '*.vim')) + call assert_equal(['sautest/autoload/Test104.vim', 'sautest/autoload/footest.vim'], + \ globpath('sautest/autoload', '*.vim', 0, 1)) +endfunction |