1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46
|
Set up cram alias and example tests:
$ . "$TESTDIR"/setup.sh
Usage:
$ cram -h
[Uu]sage: cram \[OPTIONS\] TESTS\.\.\. (re)
[Oo]ptions: (re)
-h, --help show this help message and exit
-V, --version show version information and exit
-q, --quiet don't print diffs
-v, --verbose show filenames and test status
-i, --interactive interactively merge changed test output
-d, --debug write script output directly to the terminal
-y, --yes answer yes to all questions
-n, --no answer no to all questions
-E, --preserve-env don't reset common environment variables
--keep-tmpdir keep temporary directories
--shell=PATH shell to use for running tests (default: /bin/sh)
--shell-opts=OPTS arguments to invoke shell with
--indent=NUM number of spaces to use for indentation (default: 2)
--xunit-file=PATH path to write xUnit XML output
$ cram -V
Cram CLI testing framework (version 0.7)
Copyright (C) 2010-2016 Brodie Rao <brodie@bitheap.org> and others
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
$ cram
[Uu]sage: cram \[OPTIONS\] TESTS\.\.\. (re)
[2]
$ cram -y -n
options --yes and --no are mutually exclusive
[2]
$ cram non-existent also-not-here
no such file: non-existent
[2]
$ mkdir empty
$ cram empty
no tests found
[2]
$ cram --shell=./badsh
shell not found: ./badsh
[2]
|