Download Latest Version cmd-test-1.0.3.tar.gz (22.1 kB)
Email in envelope

Get an email when there's a new version of cmd-test

Home / cmd-test / 1.0.0
Name Modified Size InfoDownloads / Week
Parent folder
README 2013-06-06 2.8 kB
cmd-test-1.0.0-setup.exe 2013-06-06 8.6 MB
cmd-test-1.0.0.tar.gz 2013-06-06 24.2 kB
Totals: 3 Items   8.6 MB 0
Introduction
===========================

This console application helps in testing other console applications
by checking the output agains specific rules specified by the
user as regular expressions. Check home page[2] for updates and
latest news.

The application expects as arguments one or more control files
that consist of commands. Each line is interpreted and
compared against a list of known commands. Comments must
stay on their own line and should start with a # sign.

The documentation uses the term target to refer to a program that
is being tested. To create a new target use the TARGET command. 
To change current target use the SWITCH command. Targets are
discarded only at the end of the program. If you do not
check explicitly for program exit using END TARGET or EXIT CODE,
the program will check this itself at the end. Finding a target
still running at this point is considered to be a failed test.

List of build-in commands:
INCLUDE <file>
    includes another file; the file is interpreted before
    stepping to next line.
TARGET [path/]<name> [ARGS <arguments>]
    starts a program identified by path and name and provides
    the arguments to it. Failing to find the program
    is considered an error.
SWITCH <name>
    changes current target to the one identified by the <name>.
    This string must be the same one that was provided to 
    TARGET command. If the name is not found is considered to be 
    an error.
END TARGET [name]
    chacks the target to see if it ended its execution.
    The target is either the current target (if no name was specified)
    or the one that is indicated by the name.
    If the target has ended this counts as a successful test,
    otherwise it counts as a failed test.
EXIT CODE <code>
EXIT CODE NOT <code>
    checks if the current target ended its execution and 
    with what code.
COMMAND <cmd>
    sends the string (and an ending new line character) to the program.
EXPECT <pattern>
EXPECTE <pattern>
EXPECTO <pattern>
    checks the output of the program against provided regular expression.
    EXPECT checks both standard output and standard error chanels,
    while EXPECTE and EXPECTO check only specific chanels.
    Note that the coresponding output buffer is cleared after these commands.

The commands are case-insensitive, but always presented as Uppercase 
in documentation.

Licence
===========================

The project is distributed under the 3-clause license
("Revised BSD License", "New BSD License", or 
"Modified BSD License") [1]. Read about it in the COPYING file.

[1] http://en.wikipedia.org/wiki/BSD_licenses#3-clause_license_.28.22Revised_BSD_License.22.2C_.22New_BSD_License.22.2C_or_.22Modified_BSD_License.22.29
[2] http://cmdtest.sourceforge.net/
Source: README, updated 2013-06-06