Skip to content

Commit d4da5f8

Browse files
authored
Merge pull request #21 from n0vember-/master
Addendum to README concerning archlinux package
2 parents ebc7ea7 + 97afac8 commit d4da5f8

File tree

2 files changed

+69
-0
lines changed

2 files changed

+69
-0
lines changed

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,12 @@ This will install bash_unit in your current working directory:
3838

3939
You can also download it from the [release page](https://github.com/pgrange/bash_unit/releases).
4040

41+
## installing on Archlinux
42+
43+
bash_unit package is available on Archlinux through AUR. In order to install, issue the following command :
44+
45+
yaourt -Sys bash_unit
46+
4147
# How to run tests
4248

4349
To run tests, simply call bash_unit with all your tests files as parameter. For instance to run bash_unit tests, from bash_unit directory:

docs/man/man1/bash_unit.1

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
.\" Manpage for bash_unit.
2+
.\" Contact n0vember at half-9 dot net to correct errors or typos
3+
.TH man 1 "17 September 2016" "1.0" "bash_unit man page"
4+
.SH NAME
5+
bash_unit \- run unit tests
6+
.SH SYNOPSIS
7+
.B bash_unit
8+
[ -p TEST_NAME ... ]
9+
.RI TESTS_FILE
10+
.SH DESCRIPTION
11+
bash_unit runs the tests writen in the tests_file given as argument. Tests file format is described below in the TESTS FILE section.
12+
13+
You can limit the tests to be run by naming them with the -p option. This option can be specified mutiple times in order to launch a subset of tests.
14+
.SH OPTIONS
15+
.TP
16+
.BI \-p " " TEST_NAME
17+
Default bash_unit behaviour is to run every test found in tests_file. This option will limit bash_unit to the specified tests.
18+
.SH TESTS FILE
19+
TESTS FILE is a bash script only containing functions. There are some
20+
.I RESERVED FUNCTION NAMES
21+
and the
22+
.I TESTS FUNCTIONS.
23+
All
24+
.I TESTS FUNCTIONS
25+
are called one by one during the testing process whereas functions with
26+
.I RESERVED FUNCTION NAMES
27+
are called to prepare the testing environment.
28+
.SH TESTS FUNCTIONS
29+
tests functions are basic shell functions returning 0 exit code when test is succesfull and any other value if unsuccesfull. They can use
30+
.I TESTING FUNCTIONS.
31+
You can also add regular bash functions to call in your tests.
32+
.SH RESERVED FUNCTION NAMES
33+
.TP
34+
.B setup
35+
.SH TESTING FUNCTIONS
36+
.I TESTS FUNCTIONS
37+
you write can (and should) use bash_unit
38+
.I TESTING FUNCTIONS.
39+
This functions are :
40+
.TP
41+
.B assert
42+
.TP
43+
.B fail
44+
.TP
45+
.B assert_fail
46+
.TP
47+
.B assert_status_code
48+
.TP
49+
.B assert_equals
50+
.TP
51+
.TP
52+
.B fake
53+
.B assert_not_equals
54+
.SH SEE ALSO
55+
The best documentation is to be found on the github project page :
56+
57+
https://github.com/pgrange/bash_unit
58+
.SH BUGS
59+
No known bugs. Bugs may be reported using the github issues process here :
60+
61+
https://github.com/pgrange/bash_unit/issues
62+
.SH AUTHOR
63+
Pascal Grange (pascal at grange dot nom dot fr)

0 commit comments

Comments
 (0)