vim-patch:7.4.1365 (#5037)

Problem:    Cannot execute a single test function.
Solution:   Add an argument to filter the functions with. (Yasuhiro Matsumoto)

befb366aff
This commit is contained in:
prollings 2016-07-20 15:40:04 +10:00 committed by Justin M. Keyes
parent 92866042d9
commit 7563972fd9
2 changed files with 11 additions and 1 deletions

View File

@ -2,6 +2,11 @@
" When the script is successful the .res file will be created. " When the script is successful the .res file will be created.
" Errors are appended to the test.log file. " Errors are appended to the test.log file.
" "
" To execute only specific test functions, add a second argument. It will be
" matched against the names of the Test_ function. E.g.:
" ../vim -u NONE -S runtest.vim test_channel.vim open_delay
" The output can be found in the "messages" file.
"
" The test script may contain anything, only functions that start with " The test script may contain anything, only functions that start with
" "Test_" are special. These will be invoked and should contain assert " "Test_" are special. These will be invoked and should contain assert
" functions. See test_assert.vim for an example. " functions. See test_assert.vim for an example.
@ -68,6 +73,11 @@ silent function /^Test_
redir END redir END
let tests = split(substitute(@q, 'function \(\k*()\)', '\1', 'g')) let tests = split(substitute(@q, 'function \(\k*()\)', '\1', 'g'))
" If there is an extra argument filter the function names against it.
if argc() > 1
let tests = filter(tests, 'v:val =~ argv(1)')
endif
" Execute the tests in alphabetical order. " Execute the tests in alphabetical order.
for test in sort(tests) for test in sort(tests)
echo 'Executing ' . test echo 'Executing ' . test

View File

@ -334,7 +334,7 @@ static int included_patches[] = {
// 1368 NA // 1368 NA
// 1367 NA // 1367 NA
1366, 1366,
// 1365, 1365,
// 1364 NA // 1364 NA
// 1363 NA // 1363 NA
// 1362 NA // 1362 NA