Skip to content
This repository has been archived by the owner on Apr 29, 2021. It is now read-only.

Commit

Permalink
add Manpages
Browse files Browse the repository at this point in the history
- add bats.1
- add bats.7
- tweak install.sh to install manpages
  • Loading branch information
weakish committed Nov 9, 2013
1 parent ddd03ab commit b1eee9f
Show file tree
Hide file tree
Showing 8 changed files with 1,070 additions and 0 deletions.
2 changes: 2 additions & 0 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,7 @@ BATS_ROOT="$(abs_dirname "$0")"
mkdir -p "$PREFIX"/{bin,libexec}
cp -R "$BATS_ROOT"/bin/* "$PREFIX"/bin
cp -R "$BATS_ROOT"/libexec/* "$PREFIX"/libexec
cp "$BATS_ROOT"/man/bats.1 "$PREFIX"/share/man/man1
cp "$BATS_ROOT"/man/bats.7 "$PREFIX"/share/man/man7

echo "Installed Bats to $PREFIX/bin/bats"
86 changes: 86 additions & 0 deletions man/bats.1
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
.TH "BATS" "1" "November 2013" "" ""
.
.SH "NAME"
\fBbats\fR \- Bash Automated Testing System
.
.SH "SYNOPSIS"
bats [\-c] [\-p | \-t] \fItest\fR [\fItest\fR \.\.\.]
.
.SH "DESCRIPTION"
Bats is a TAP\-compliant testing framework for Bash\. It provides a simple way to verify that the UNIX programs you write behave as expected\.
.
.P
Bats is most useful when testing software written in Bash, but you can use it to test any UNIX program\.
.
.SH "FILES"
To run your tests, invoke the \fBbats\fR interpreter with a path to a test file\. The file\'s test cases are run sequentially and in isolation\. If all the test cases pass, \fBbats\fR exits with a \fB0\fR status code\. If there are any failures, \fBbats\fR exits with a \fB1\fR status code\.
.
.P
You can invoke the \fBbats\fR interpreter with multiple test file arguments, or with a path to a directory containing multiple \fB\.bats\fR files\. Bats will run each test file individually and aggregate the results\. If any test case fails, \fBbats\fR exits with a \fB1\fR status code\.
.
.SH "OPTIONS"
.
.TP
\fB\-c\fR, \fB\-\-count\fR
Count the number of test cases without running any tests
.
.TP
\fB\-h\fR, \fB\-\-help\fR
Display this help message
.
.TP
\fB\-p\fR, \fB\-\-pretty\fR
Show results in pretty format (default for terminals)
.
.TP
\fB\-t\fR, \fB\-\-tap\fR
Show results in TAP format
.
.TP
\fB\-v\fR, \fB\-\-version\fR
Display the version number
.
.SH "EXAMPLES"
When you run Bats from a terminal, you\'ll see output as each test is performed, with a check\-mark next to the test\'s name if it passes or an "X" if it fails\.
.
.IP "" 4
.
.nf

$ bats addition\.bats
✓ addition using bc
✓ addition using dc

2 tests, 0 failures
.
.fi
.
.IP "" 0
.
.P
If Bats is not connected to a terminal—in other words, if you run it from a continuous integration system or redirect its output to a file—the results are displayed in human\-readable, machine\-parsable TAP format \fIhttp://testanything\.org/wiki/index\.php/TAP_specification#THE_TAP_FORMAT\fR\. You can force TAP output from a terminal by invoking Bats with the \fB\-\-tap\fR option\.
.
.IP "" 4
.
.nf

$ bats \-\-tap addition\.bats
1\.\.2
ok 1 addition using bc
ok 2 addition using dc
.
.fi
.
.IP "" 0
.
.SH "COPYRIGHT"
(c) 2013 Sam Stephenson\.
.
.P
Bats is released under an MIT\-style license
.
.SH "SEE ALSO"
bats(7)
156 changes: 156 additions & 0 deletions man/bats.1.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

87 changes: 87 additions & 0 deletions man/bats.1.ronn
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
bats(1) -- Bash Automated Testing System
========================================

SYNOPSIS
--------

bats [-c] [-p | -t] <test> [<test> ...]


DESCRIPTION
-----------


Bats is a TAP-compliant testing framework for Bash.
It provides a simple way to verify that the UNIX programs you write behave as expected.

Bats is most useful when testing software written in Bash, but you can use it to test any UNIX program.


FILES
-----

To run your tests, invoke the `bats` interpreter with a path to a test
file. The file's test cases are run sequentially and in isolation. If
all the test cases pass, `bats` exits with a `0` status code. If there
are any failures, `bats` exits with a `1` status code.

You can invoke the `bats` interpreter with multiple test file
arguments, or with a path to a directory containing multiple `.bats`
files. Bats will run each test file individually and aggregate the
results. If any test case fails, `bats` exits with a `1` status code.


OPTIONS
-------

* `-c`, `--count`:
Count the number of test cases without running any tests
* `-h`, `--help`:
Display this help message
* `-p`, `--pretty`:
Show results in pretty format (default for terminals)
* `-t`, `--tap`:
Show results in TAP format
* `-v`, `--version`:
Display the version number


EXAMPLES
--------


When you run Bats from a terminal, you'll see output as each test is
performed, with a check-mark next to the test's name if it passes or
an "X" if it fails.

$ bats addition.bats
✓ addition using bc
✓ addition using dc

2 tests, 0 failures

If Bats is not connected to a terminal—in other words, if you
run it from a continuous integration system or redirect its output to
a file—the results are displayed in human-readable, machine-parsable
[TAP format](http://testanything.org/wiki/index.php/TAP_specification#THE_TAP_FORMAT).
You can force TAP output from a terminal by invoking Bats with the
`--tap` option.

$ bats --tap addition.bats
1..2
ok 1 addition using bc
ok 2 addition using dc


COPYRIGHT
---------

(c) 2013 Sam Stephenson.

Bats is released under an MIT-style license


SEE ALSO
--------

bats(7)
Loading

0 comments on commit b1eee9f

Please sign in to comment.