Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Update documentation with recent changes in output and default plugin…

… load level.
  • Loading branch information...
commit acb73827388144abf1bd000f342037aa665bad83 1 parent 2d37c01
@inkarkat authored
Showing with 53 additions and 62 deletions.
  1. +14 −14 doc/runVimMsgFilter.txt
  2. +10 −19 doc/runVimTests.txt
  3. +29 −29 doc/vimtest.txt
View
28 doc/runVimMsgFilter.txt
@@ -1,9 +1,9 @@
-*runVimMsgFilter.txt* Message matcher for the runVimTests testing framework.
+*runVimMsgFilter.txt* Message matcher for the runVimTests testing framework.
RUN VIM TESTS by Ingo Karkat
Matching of *.msgok message assumptions against *.msgout file, writing results
-into *.msgresult. Used by the |runVimTests| testing framework.
+into *.msgresult. Used by the |runVimTests| testing framework.
*runVimMsgFilter.vim*
description |runVimMsgFilter-description|
@@ -21,7 +21,7 @@ This script is employed by the |runVimTests| testing framework to process and
match the captured message output from a single test execution
(testXXX.out) against a provided list of message assertions, which are
essentially literal text fragments or regular expressions that must match
-sequentially in the captured message output.
+sequentially in the captured message output.
==============================================================================
USAGE *runVimMsgFilter-usage*
@@ -29,16 +29,16 @@ USAGE *runVimMsgFilter-usage*
Invoke Vim via >
$ vim -S runVimMsgFilter.vim -c "RunVimMsgFilter" -c "quitall!" testXXX.msgok
The filter run will save the results in testXXX.msgresult in the same
-directory as the *.msgok file; it will override a previous result.
+directory as the *.msgok file; it will override a previous result.
The first line of the result will contain a summary, starting with either
'OK (msgout):', 'ERROR (msgout):' or 'FAIL (msgout):'. In case of failures
(but not when everything failed), details about the unmatched message
-assertion and the affected lines will be appended.
+assertion and the affected lines will be appended.
MSGOK *runVimMsgFilter-msgok*
The testXXX.msgok file contains multiple message assertions, which are
-separated by empty (i.e. containing only optional whitespace) lines.
+separated by empty (i.e. containing only optional whitespace) lines.
Each message assertion is compiled into a Vim regexp, e.g.
foo ~
bar ~
@@ -50,7 +50,7 @@ which are delimited by a common non-alphabetic, non-whitespace character
(e.g. /.../ or +...+, but not \...\ or "..."), e.g.
/foo\+ is \d\{3,6} in \(here\|there\)/. ~
Each regular expression line is automatically anchored to the start and end
-of a line, so the '^' and '$' atoms need not be specified.
+of a line, so the '^' and '$' atoms need not be specified.
During the filtering run, message assertions are processed sequentially from
first to last, trying to match the actual message output from top to bottom.
@@ -61,7 +61,7 @@ and the next assertion is tried, beginning at the same current start
position. If a message condition matches, it is spent and is not reapplied.
Thus, if you want to match the same text multiple times, either build a
complex multi-line regexp with multiplicity (|/\{n,m}|), or include a simple
-assertion multiple times in a row.
+assertion multiple times in a row.
TIPS *runVimMsgFilter-tips*
To make sure that a message was actually generated from a particular
@@ -80,11 +80,11 @@ INSTALLATION *runVimMsgFilter-installation*
This script will be automatically sourced by the runVimTests unit test
launcher script. It must reside in the same directory as the runVimTests shell
-script. You do not need to install this script into ~/.vim/plugin!
+script. You do not need to install this script into ~/.vim/plugin!
DEPENDENCIES *runVimMsgFilter-dependencies*
-- Requires Vim 7.2 or higher.
+- Requires Vim 7.2 or higher.
==============================================================================
LIMITATIONS *runVimMsgFilter-limitations*
@@ -95,7 +95,7 @@ TODO *runVimMsgFilter-todo*
- Allow comments?
- Allow optional lines via ?...?
-- Show not matching lines from msgout if not too many.
+- Show not matching lines from msgout if not too many.
IDEAS *runVimMsgFilter-ideas*
@@ -103,14 +103,14 @@ IDEAS *runVimMsgFilter-ideas*
HISTORY *runVimMsgFilter-history*
1.00 02-Mar-2009
-First published version.
+First published version.
0.01 26-Jan-2009
-Started development.
+Started development.
==============================================================================
Copyright: (C) 2009 Ingo Karkat
-The VIM LICENSE applies to this script; see |copyright|.
+The VIM LICENSE applies to this plugin; see |copyright|.
Maintainer: Ingo Karkat <ingo@karkat.de>
==============================================================================
View
29 doc/runVimTests.txt
@@ -7,8 +7,6 @@ description |runVimTests-description|
usage |runVimTests-usage|
invoking |runVimTests-invoking|
installation |runVimTests-installation|
-configuration |runVimTests-configuration|
-integration |runVimTests-integration|
framework |runVimTests-framework|
test scripts |runVimTests-testscripts|
limitations |runVimTests-limitations|
@@ -19,7 +17,7 @@ history |runVimTests-history|
==============================================================================
MOTIVATION *runVimTests-motivation*
-Every script writer knows how tedious it is to update a published script. In
+Every script writer knows how tedious it is to update a published plugin. In
addition to the basic functionality, many corner cases (empty line, last line,
etc.) and failures (invalid filename, nomodifiable buffer) need to be tested,
and people use Vim on different platforms (Windows / Linux), UIs (Console /
@@ -135,11 +133,11 @@ arguments) or prerequisites weren't met, 3 in case of an internal error.
After test execution, a summary is printed like this:
20 files with 33 tests; 2 skipped, 27 run: 16 OK, 11 failures, 6 errors. ~
- Tests with skips: test006 ~
- Skipped tests: test007 ~
- 2 SKIP (tap): Need 'autochdir' option~
- Failed tests: test002, test012, test014, test022, test032, test033 ~
- Tests with errors: test003, test013, test023, test033 ~
+ Tests with skips: test006.vim ~
+ Skipped tests: test007.vim ~
+ 2 SKIP (tap): Need 'autochdir' option ~
+ Failed tests: test002.vim test012.vim test014.vim test022.vim test032.vim ~
+ Tests with errors: test003.vim test013.vim test023.vim test033.vim ~
A test is counted as each existing *.[msg]ok file, or by an announcement of
the planned tests by a TAP test. Tests have "run" when corresponding output
@@ -171,8 +169,9 @@ the message output.) The --graphical options uses the GUI version GVIM.
In order to ensure that your script-under-test is compatible with other users'
settings and not dependent on any of your personal settings, it is advisable
-to test at least with the default Vim settings in addition to your customized
-setup. For this, the plugin load level can be specified:
+to test with the default Vim settings; this is the default behavior. To use no
+plugins or all of your user customizations, the plugin load level can be
+specified:
-0 / --pure Starts Vim without loading any .vimrc and plugins, but in
'nocompatible' mode. This is the most pure mode of using
Vim.
@@ -181,8 +180,6 @@ setup. For this, the plugin load level can be specified:
loaded. This emulates a fresh install of Vim.
-2 / --user Starts Vim with user .vimrc and plugins, and thus provides
exactly your personal setup you're used to.
-Tip: If you have lots of plugins in your ~/.vim directory, using -1 can
-greatly speed up test execution. The default is -2, though.
Tip: If you want to test with especially unusual or tough settings, put them
into a separate Vim script and use --source to include it in the test run.
@@ -251,12 +248,6 @@ sourced in order to modify %PATH% to include the Unix tools. This way, you can
avoid to permanently place these Unix tools into %PATH%.
==============================================================================
-CONFIGURATION *runVimTests-configuration*
-
-==============================================================================
-INTEGRATION *runVimTests-integration*
-
-==============================================================================
FRAMEWORK *runVimTests-framework*
Each testXXX.vim test is executed in a separate Vim process. The test file is
@@ -500,7 +491,7 @@ Started development.
==============================================================================
Copyright: (C) 2009-2013 Ingo Karkat
-The VIM LICENSE applies to this script; see |copyright|.
+The VIM LICENSE applies to this plugin; see |copyright|.
Maintainer: Ingo Karkat <ingo@karkat.de>
==============================================================================
View
58 doc/vimtest.txt
@@ -1,4 +1,4 @@
-*vimtest.txt* General utility functions for the runVimTests testing framework.
+*vimtest.txt* General utility functions for the runVimTests testing framework.
RUN VIM TESTS by Ingo Karkat
*vimtest.vim*
@@ -17,7 +17,7 @@ This autoload script provides convenience and helper functions that simplify
the writing of tests for the |runVimTests| testing framework; i.e. you have to
type less, your test scripts contain less boilerplate code, and the
abstraction layer avoids having to modify all test scripts in case of a future
-incompatible change to the testing framework.
+incompatible change to the testing framework.
==============================================================================
USAGE *vimtest-usage*
@@ -25,17 +25,17 @@ USAGE *vimtest-usage*
vimtest#Quit() *vimtest#Quit()*
Quits Vim at the end of the test execution (so that the next
test can be executed in a fresh Vim instance) unless debugging
- has been enabled.
+ has been enabled.
If you've started TAP testing with |vimtest#StartTap()|, the
TAP output is flushed automatically (via |vimtap#FlushOutput|)
- for you.
+ for you.
vimtest#System({shellcmd} [, {ignore-errors}]) *vimtest#System()*
Executes {shellcmd} (which must already be properly escaped,
cp. |shellescape()|) and aborts test execution if {shellcmd}
fails; otherwise returns 1. This is useful if you need to run
external commands in order to setup the test harness or to
- verify the test results.
+ verify the test results.
When the {ignore-errors} argument is present and is non-zero,
shell errors are ignored; the function then returns 0 and test
execution continues. This can be used to completely bail out
@@ -49,71 +49,71 @@ vimtest#StartTap([{testfilespec}]) *vimtest#StartTap()*
Sets the output file for the |VimTAP| test. {testfilespec} can
be omitted, as the test framework sets the test name.
If you stop testing via |vimtest#Quit()|, the TAP output is
- flushed automatically.
+ flushed automatically.
So this function saves you a little bit of typing in
comparison to using|vimtap#SetOutputFile|/ |vimtap#FlushOutput|
- directly.
+ directly.
vimtest#SaveOut([{testfilespec}]) *vimtest#SaveOut()*
Saves the current buffer as the test output (testXXX.out).
{testfilespec} can be omitted, as the test framework sets the
- test name.
+ test name.
Note: The *.out files are always written with fileformat=unix
- to allow platform-independent comparisons.
+ to allow platform-independent comparisons.
vimtest#RequestInput({input}) *vimtest#RequestInput()*
Prompts the user to enter the key(s) described by {input}.
Useful if the object-under-test requires a user confirmation
- (e.g. a prompt "Overwrite yes/no?") to continue.
+ (e.g. a prompt "Overwrite yes/no?") to continue.
This is basically just an |:echomsg| with flashy highlighting
- so that the message is noticed by the user.
+ so that the message is noticed by the user.
Example: >
- call vimtest#RequestInput('Yes')
+ call vimtest#RequestInput('Yes')
MyCommandUnderTestThatRequiresUserConfirmation
<
*vimtest-signals*
vimtest#BailOut({reason}) *vimtest#BailOut()*
Signals that things are going so badly that all testing should
terminate; no further test scripts should be run. Also quits
- Vim.
+ Vim.
vimtest#Error({reason}) *vimtest#Error()*
- Signals an error in the test execution.
+ Signals an error in the test execution.
vimtest#ErrorAndQuit({reason}) *vimtest#ErrorAndQuit()*
vimtest#ErrorAndQuitIf({condition}, {reason}) *vimtest#ErrorAndQuitIf()*
Signals an error in the test execution and quits this test (if
- {condition} is true).
+ {condition} is true).
An often used combination of |vimtest#Error()| and
- |vimtest#Quit()|.
+ |vimtest#Quit()|.
vimtest#Skip({reason}) *vimtest#Skip()*
Signals that this test should be skipped and all test output
- should be disregarded.
+ should be disregarded.
vimtest#SkipOut({reason}) *vimtest#SkipOut()*
vimtest#SkipMsgout({reason}) *vimtest#SkipMsgout()*
vimtest#SkipTap({reason}) *vimtest#SkipTap()*
Signals that once particular test method (saved buffer output,
- captured messages or TAP unit tests) should be disregarded.
+ captured messages or TAP unit tests) should be disregarded.
vimtest#SkipAndQuitIf({condition}, {reason}) *vimtest#SkipAndQuitIf()*
Signals that this test should be skipped (e.g. due to missing
dependencies, unsupported platform, etc.) if {condition} is
- true. Also quits Vim.
+ true. Also quits Vim.
This is a convenience method that combines the check for
- skipping with the skip signal and quitting.
+ skipping with the skip signal and quitting.
==============================================================================
INSTALLATION *vimtest-installation*
Put the script into your user or system Vim autoload directory
-(e.g. ~/.vim/autoload).
+(e.g. ~/.vim/autoload).
DEPENDENCIES *vimtest-dependencies*
-- Requires Vim 7.0 or higher.
-- Requires escapings.vim autoload script (for Vim 7.0/7.1).
+- Requires Vim 7.0 or higher.
+- Requires escapings.vim autoload script (for Vim 7.0/7.1).
==============================================================================
LIMITATIONS *vimtest-limitations*
@@ -127,25 +127,25 @@ HISTORY *vimtest-history*
1.15 07-Oct-2010 (unreleased)
- ENH: Added vimtest#ErrorAndQuit() and vimtest#ErrorAndQuitIf() for
- convenience.
+ convenience.
1.14 10-Jul-2009 (unreleased)
-- BF: vimtest#System() didn't abort via vimtest#Quit() on shell errors.
+- BF: vimtest#System() didn't abort via vimtest#Quit() on shell errors.
- Added optional isIgnoreErrors argument to vimtest#System().
1.10 08-Mar-2009
ENH: Added vimtest#BailOut(), vimtest#Error(), and vimtest#Skip...()
-functions.
+functions.
1.00 02-Mar-2009
-First published version.
+First published version.
0.01 29-Jan-2009
-Started development.
+Started development.
==============================================================================
Copyright: (C) 2009-2010 Ingo Karkat
-The VIM LICENSE applies to this script; see |copyright|.
+The VIM LICENSE applies to this plugin; see |copyright|.
Maintainer: Ingo Karkat <ingo@karkat.de>
==============================================================================
Please sign in to comment.
Something went wrong with that request. Please try again.