Skip to content

Commit bf63011

Browse files
committed
patch 9.0.1570: some tests are slow
Problem: Some tests are slow. Solution: Make a few test cases faster.
1 parent 2bd6a09 commit bf63011

5 files changed

Lines changed: 645 additions & 640 deletions

File tree

src/testdir/test_cmdline.vim

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -791,10 +791,10 @@ func Test_shellcmd_completion()
791791
endfunc
792792

793793
func Test_expand_star_star()
794-
call mkdir('a/b', 'pR')
795-
call writefile(['asdfasdf'], 'a/b/fileXname')
796-
call feedkeys(":find **/fileXname\<Tab>\<CR>", 'xt')
797-
call assert_equal('find a/b/fileXname', @:)
794+
call mkdir('a/b/c', 'pR')
795+
call writefile(['asdfasdf'], 'a/b/c/fileXname')
796+
call feedkeys(":find a/**/fileXname\<Tab>\<CR>", 'xt')
797+
call assert_equal('find a/b/c/fileXname', @:)
798798
bwipe!
799799
endfunc
800800

src/testdir/test_codestyle.vim

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
def Test_source_files()
44
for fname in glob('../*.[ch]', 0, 1)
5+
bwipe!
56
exe 'edit ' .. fname
67

78
cursor(1, 1)
@@ -26,11 +27,11 @@ def Test_source_files()
2627
lnum = search(')\s*{', '', 0, 0, skip)
2728
assert_equal(0, lnum, fname .. ': curly after closing paren')
2829

29-
cursor(1, 1)
3030
# Examples in comments use double quotes.
3131
skip = "getline('.') =~ '\"'"
32-
# Avoid examples that contain: "} else
33-
lnum = search('[^"]}\s*else', '', 0, 0, skip)
32+
33+
cursor(1, 1)
34+
lnum = search('}\s*else', '', 0, 0, skip)
3435
assert_equal(0, lnum, fname .. ': curly before "else"')
3536

3637
cursor(1, 1)

0 commit comments

Comments
 (0)