summaryrefslogtreecommitdiff
path: root/README
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2011-12-17 20:50:15 +0000
committerLars Wirzenius <liw@liw.fi>2011-12-17 20:50:15 +0000
commit21b98d7dbb548cad9cd8783c10665718bdcb3444 (patch)
treec51b598e687225d952eddb10cceb4993f6530358 /README
parenta657020d4e208ab37c18277f75cb0578f34e3ce0 (diff)
downloadcmdtest-21b98d7dbb548cad9cd8783c10665718bdcb3444.tar.gz
remove --command / -c option and $COMMAND and foo.args
Diffstat (limited to 'README')
-rw-r--r--README19
1 files changed, 2 insertions, 17 deletions
diff --git a/README b/README
index 200c322..0383b27 100644
--- a/README
+++ b/README
@@ -12,10 +12,7 @@ standard output.
Each test case consists of:
-* a set of command line arguments, not including the command name (`foo.args`)
- - each argument is on its own line
-* alternatively, a script to run the command, in case that's easier
- (`foo.script`)
+* a script to run the test (`foo.script`)
* the file fed to standard input (`foo.stdin`)
* the expected output to the standard output (`foo.stdout`)
* the expected output to the standard error (`foo.stderr`)
@@ -38,8 +35,7 @@ or several such directories, and it does the following:
* for each test case (unique prefix `foo`):
- execute `setup`
- execute `foo.setup`
- - execute the command, giving it command line arguments from
- `foo.args`, or by running `foo.script`,
+ - execute the command, by running `foo.script`,
and redirecting standard input to come from `foo.stdin`
- capture standard output and error and exit codes
- execute `foo.teardown`
@@ -54,18 +50,7 @@ error files is missing, it is treated as if it were empty. If the
exit code file is missing, it is treated as if it specified an exit
code of zero.
-The actual command is given to `cmdtest` separately. This allows
-testing various implementations of the same command, for example
-various checksum utilities, or different versions of the same command.
-If `foo.args` would hardcode the command name, this would be hard
-to achieve.
-
The shell scripts may use the following environment variables:
* `DATADIR`: a temporary directory where files may be created by the test
-* `COMMAND`: the command to be run; it is an absolute pathname
-
-In addition, the `foo.args` files can use Pythonic string expansion:
-
-* `%(datadir)s` for the same value as `$DATADIR`