mirror of
https://github.com/sstephenson/bats.git
synced 2024-11-17 03:32:27 +01:00
Updated re-ran ronn to generate man page.
This commit is contained in:
parent
21277a33ad
commit
a612c1185c
62
man/bats.7
62
man/bats.7
|
@ -1,7 +1,7 @@
|
||||||
.\" generated with Ronn/v0.7.3
|
.\" generated with Ronn/v0.7.3
|
||||||
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
||||||
.
|
.
|
||||||
.TH "BATS" "7" "November 2013" "" ""
|
.TH "BATS" "7" "September 2017" "" ""
|
||||||
.
|
.
|
||||||
.SH "NAME"
|
.SH "NAME"
|
||||||
\fBbats\fR \- Bats test file format
|
\fBbats\fR \- Bats test file format
|
||||||
|
@ -142,6 +142,66 @@ Or you can skip conditionally:
|
||||||
.
|
.
|
||||||
.IP "" 0
|
.IP "" 0
|
||||||
.
|
.
|
||||||
|
.SH "THE TODO COMMAND"
|
||||||
|
Tests can be marked as TODO by using the \fBtodo\fR command at the point in a test before it completes\.
|
||||||
|
.
|
||||||
|
.P
|
||||||
|
A passing test marked with TODO should be considered a "bonus", but both pass and fail are considered successful\.
|
||||||
|
.
|
||||||
|
.P
|
||||||
|
See the TAP specification \fIhttp://testanything\.org/tap\-specification\.html\fR for more details on this feature\.
|
||||||
|
.
|
||||||
|
.IP "" 4
|
||||||
|
.
|
||||||
|
.nf
|
||||||
|
|
||||||
|
@test "A test that may fail" {
|
||||||
|
todo
|
||||||
|
run foo
|
||||||
|
[ "$status" \-eq 0 ]
|
||||||
|
}
|
||||||
|
.
|
||||||
|
.fi
|
||||||
|
.
|
||||||
|
.IP "" 0
|
||||||
|
.
|
||||||
|
.P
|
||||||
|
Optionally, you may include a reason for marking TODO:
|
||||||
|
.
|
||||||
|
.IP "" 4
|
||||||
|
.
|
||||||
|
.nf
|
||||||
|
|
||||||
|
@test "A test that may fail" {
|
||||||
|
todo "This command will return zero soon, but not now"
|
||||||
|
run foo
|
||||||
|
[ "$status" \-eq 0 ]
|
||||||
|
}
|
||||||
|
.
|
||||||
|
.fi
|
||||||
|
.
|
||||||
|
.IP "" 0
|
||||||
|
.
|
||||||
|
.P
|
||||||
|
Or you can mark todo conditionally:
|
||||||
|
.
|
||||||
|
.IP "" 4
|
||||||
|
.
|
||||||
|
.nf
|
||||||
|
|
||||||
|
@test "A test which usually fails on a mac" {
|
||||||
|
if [ $(uname \-s) == Darwin ]; then
|
||||||
|
todo "Get this working on a Mac"
|
||||||
|
fi
|
||||||
|
|
||||||
|
run foo
|
||||||
|
[ "$status" \-eq 0 ]
|
||||||
|
}
|
||||||
|
.
|
||||||
|
.fi
|
||||||
|
.
|
||||||
|
.IP "" 0
|
||||||
|
.
|
||||||
.SH "SETUP AND TEARDOWN FUNCTIONS"
|
.SH "SETUP AND TEARDOWN FUNCTIONS"
|
||||||
You can define special \fBsetup\fR and \fBteardown\fR functions which run before and after each test case, respectively\. Use these to load fixtures, set up your environment, and clean up when you\'re done\.
|
You can define special \fBsetup\fR and \fBteardown\fR functions which run before and after each test case, respectively\. Use these to load fixtures, set up your environment, and clean up when you\'re done\.
|
||||||
.
|
.
|
||||||
|
|
Loading…
Reference in New Issue
Block a user