mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
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:
parent
92866042d9
commit
7563972fd9
@ -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
|
||||||
|
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user