'\" t
.\" Title: shunit2
.\" Author: [see the "Author" section]
.\" Generator: DocBook XSL Stylesheets vsnapshot
.\" Date: 12/29/2020
.\" Manual: \ \&
.\" Source: \ \& 2.1.6
.\" Language: English
.\"
.TH "SHUNIT2" "1" "12/29/2020" "\ \& 2\&.1\&.6" "\ \&"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
shunit2 \- A unit test framework for shell scripts
.SH "SYNOPSIS"
.sp
shunit2 unitfile
.SH "DESCRIPTION"
.sp
shUnit2 is a xUnit unit test framework for Bourne based shell scripts, and it is designed to work in a similar manner to JUnit, PyUnit, etc\&.\&. If you have ever had the desire to write a unit test for a shell script, shUnit2 can do the job\&.
.sp
You can either run \fBshunit2\fR directly from the commandline and specify the unit file or directly source the \fBshunit2\fR executable\&.
.sp
If you directly execute \fBshunit2\fR and \fBdon\(cqt\fR specify a unitfile shunit2 assumes a empty testfile and will return without an error message\&.
.SH "EXAMPLE"
.sp
Simple script to test if 1 equals 1
.sp
.if n \{\
.RS 4
.\}
.nf
#! /bin/sh
testEquality()
{
assertEquals 1 1
}
# load shunit2
\&. shunit2
.fi
.if n \{\
.RE
.\}
.sp
Execute shUnit2 unit tests directly from the commandline
.sp
.if n \{\
.RS 4
.\}
.nf
shunit2 /path/to/unit/file
.fi
.if n \{\
.RE
.\}
.SH "OPTIONS"
.sp
\fBshunit2\fR does not support any commandline options at all\&. You can either source shunit2 to execute your unit tests or directly run shunit2 as a commandline script\&.
.SH "SEE ALSO"
.sp
For more information see http://code\&.google\&.com/p/shunit2/ or have a look at the installed documentation in /usr/share/doc/shunit2/
.SH "AUTHOR"
.sp
\fBshunit2\fR was written by Kate Ward \&. This manpage was written by Ulrich Dangel \&.