Skip to content

Commit 5977cc4

Browse files
committed
FIX documentation
Tests were re-organized but documentation did not follow this new oganization.
1 parent 58ab46f commit 5977cc4

File tree

1 file changed

+7
-29
lines changed

1 file changed

+7
-29
lines changed

README.adoc

Lines changed: 7 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -66,14 +66,14 @@ endif::[]
6666

6767
== How to run tests
6868

69-
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:
69+
To run tests, simply call *bash_unit* with all your tests files as parameter. For instance to run some *bash_unit* tests, from *bash_unit* directory:
7070

7171
```test
72-
./bash_unit tests/test_bash_unit.sh
72+
./bash_unit tests/test_core.sh
7373
```
7474

7575
```output
76-
Running tests in tests/test_bash_unit.sh
76+
Running tests in tests/test_core.sh
7777
Running test_assert_equals_fails_when_not_equal... SUCCESS
7878
Running test_assert_equals_succeed_when_equal... SUCCESS
7979
Running test_assert_fail_fails... SUCCESS
@@ -87,36 +87,26 @@ Running test_assert_status_code_fails... SUCCESS
8787
Running test_assert_status_code_succeeds... SUCCESS
8888
Running test_assert_succeeds... SUCCESS
8989
Running test_bash_unit_changes_cwd_to_current_test_file_directory... SUCCESS
90-
Running test_bash_unit_runs_teardown_even_in_case_of_failure... SUCCESS
91-
Running test_bash_unit_succeed_when_no_failure_even_if_no_teardown... SUCCESS
92-
Running test_display_usage_when_test_file_does_not_exist... SUCCESS
93-
Running test_exit_code_not_0_in_case_of_failure... SUCCESS
9490
Running test_fail_fails... SUCCESS
9591
Running test_fail_prints_failure_message... SUCCESS
9692
Running test_fail_prints_where_is_error... SUCCESS
97-
Running test_fails_when_test_file_does_not_exist... SUCCESS
9893
Running test_fake_actually_fakes_the_command... SUCCESS
9994
Running test_fake_can_fake_inline... SUCCESS
10095
Running test_fake_echo_stdin_when_no_params... SUCCESS
10196
Running test_fake_exports_faked_in_subshells... SUCCESS
10297
Running test_fake_transmits_params_to_fake_code... SUCCESS
103-
Running test_one_test_should_stop_after_first_assertion_failure... SUCCESS
104-
Running test_one_test_should_stop_when_assert_fails... SUCCESS
105-
Running test_run_all_file_parameters... SUCCESS
106-
Running test_run_all_tests_even_in_case_of_failure... SUCCESS
107-
Running test_run_only_tests_that_match_pattern... SUCCESS
10898
```
10999

110100
You might also want to run only specific tests, you may do so with the
111101
_-p_ option. This option accepts a pattern as parameter and filters test
112102
functions against this pattern.
113103

114104
```test
115-
./bash_unit -p fail_fails -p assert tests/test_bash_unit.sh
105+
./bash_unit -p fail_fails -p assert tests/test_core.sh
116106
```
117107

118108
```output
119-
Running tests in tests/test_bash_unit.sh
109+
Running tests in tests/test_core.sh
120110
Running test_assert_equals_fails_when_not_equal... SUCCESS
121111
Running test_assert_equals_succeed_when_equal... SUCCESS
122112
Running test_assert_fail_fails... SUCCESS
@@ -130,19 +120,17 @@ Running test_assert_status_code_fails... SUCCESS
130120
Running test_assert_status_code_succeeds... SUCCESS
131121
Running test_assert_succeeds... SUCCESS
132122
Running test_fail_fails... SUCCESS
133-
Running test_one_test_should_stop_after_first_assertion_failure... SUCCESS
134-
Running test_one_test_should_stop_when_assert_fails... SUCCESS
135123
```
136124

137125
*bash_unit* supports the http://testanything.org/[Test Anything Protocol] so you can ask for a tap formatted
138126
output with the _-f_ option.
139127

140128
```test
141-
./bash_unit -f tap tests/test_bash_unit.sh
129+
./bash_unit -f tap tests/test_core.sh
142130
```
143131

144132
```output
145-
# Running tests in tests/test_bash_unit.sh
133+
# Running tests in tests/test_core.sh
146134
ok - test_assert_equals_fails_when_not_equal
147135
ok - test_assert_equals_succeed_when_equal
148136
ok - test_assert_fail_fails
@@ -156,24 +144,14 @@ ok - test_assert_status_code_fails
156144
ok - test_assert_status_code_succeeds
157145
ok - test_assert_succeeds
158146
ok - test_bash_unit_changes_cwd_to_current_test_file_directory
159-
ok - test_bash_unit_runs_teardown_even_in_case_of_failure
160-
ok - test_bash_unit_succeed_when_no_failure_even_if_no_teardown
161-
ok - test_display_usage_when_test_file_does_not_exist
162-
ok - test_exit_code_not_0_in_case_of_failure
163147
ok - test_fail_fails
164148
ok - test_fail_prints_failure_message
165149
ok - test_fail_prints_where_is_error
166-
ok - test_fails_when_test_file_does_not_exist
167150
ok - test_fake_actually_fakes_the_command
168151
ok - test_fake_can_fake_inline
169152
ok - test_fake_echo_stdin_when_no_params
170153
ok - test_fake_exports_faked_in_subshells
171154
ok - test_fake_transmits_params_to_fake_code
172-
ok - test_one_test_should_stop_after_first_assertion_failure
173-
ok - test_one_test_should_stop_when_assert_fails
174-
ok - test_run_all_file_parameters
175-
ok - test_run_all_tests_even_in_case_of_failure
176-
ok - test_run_only_tests_that_match_pattern
177155
```
178156

179157
== How to write tests

0 commit comments

Comments
 (0)