diff options
author | Bram Moolenaar <Bram@vim.org> | 2016-02-20 14:41:40 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2016-02-20 14:41:40 +0100 |
commit | befb366affa6309c6b4a469ec7f729821e3a36fa (patch) | |
tree | fa5342ad427568067303e274d7234e0b9d57a783 | |
parent | cf7164a088664961e7d70dd100c5874dc5ceb293 (diff) | |
download | vim-git-befb366affa6309c6b4a469ec7f729821e3a36fa.tar.gz |
patch 7.4.1365v7.4.1365
Problem: Cannot execute a single test function.
Solution: Add an argument to filter the functions with. (Yasuhiro Matsumoto)
-rw-r--r-- | src/testdir/runtest.vim | 10 | ||||
-rw-r--r-- | src/version.c | 2 |
2 files changed, 12 insertions, 0 deletions
diff --git a/src/testdir/runtest.vim b/src/testdir/runtest.vim index 2d5e21c92..469a4d385 100644 --- a/src/testdir/runtest.vim +++ b/src/testdir/runtest.vim @@ -2,6 +2,11 @@ " When the script is successful the .res file will be created. " 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_ funtion. 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 " "Test_" are special. These will be invoked and should contain assert " functions. See test_assert.vim for an example. @@ -94,6 +99,11 @@ silent function /^Test_ redir END let s:tests = split(substitute(@q, 'function \(\k*()\)', '\1', 'g')) +" If there is an extra argument filter the function names against it. +if argc() > 1 + let s:tests = filter(s:tests, 'v:val =~ argv(1)') +endif + " Execute the tests in alphabetical order. for s:test in sort(s:tests) echo 'Executing ' . s:test diff --git a/src/version.c b/src/version.c index 38d6a1d56..b3a9eec1a 100644 --- a/src/version.c +++ b/src/version.c @@ -748,6 +748,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 1365, +/**/ 1364, /**/ 1363, |