@@ -88,31 +88,30 @@ To run tests, simply call *bash_unit* with all your tests files as parameter. Fo
8888
8989```output
9090Running tests in tests/test_core.sh
91- Running test_assert_equals_fails_when_not_equal ... SUCCESS ✓
92- Running test_assert_equals_succeed_when_equal ... SUCCESS ✓
93- Running test_assert_fails ... SUCCESS ✓
94- Running test_assert_fails_fails ... SUCCESS ✓
95- Running test_assert_fails_succeeds ... SUCCESS ✓
96- Running test_assert_no_diff_fails_when_diff ... SUCCESS ✓
97- Running test_assert_no_diff_succeeds_when_no_diff ... SUCCESS ✓
98- Running test_assert_not_equals_fails_when_equal ... SUCCESS ✓
99- Running test_assert_not_equals_succeeds_when_not_equal ... SUCCESS ✓
100- Running test_assert_shows_stderr_on_failure ... SUCCESS ✓
101- Running test_assert_shows_stdout_on_failure ... SUCCESS ✓
102- Running test_assert_status_code_fails ... SUCCESS ✓
103- Running test_assert_status_code_succeeds ... SUCCESS ✓
104- Running test_assert_succeeds ... SUCCESS ✓
105- Running test_bash_unit_changes_cwd_to_current_test_file_directory ... SUCCESS ✓
106- Running test_fail_fails ... SUCCESS ✓
107- Running test_fail_prints_failure_message ... SUCCESS ✓
108- Running test_fail_prints_where_is_error ... SUCCESS ✓
109- Running test_fake_actually_fakes_the_command ... SUCCESS ✓
110- Running test_fake_can_fake_inline ... SUCCESS ✓
111- Running test_fake_echo_stdin_when_no_params ... SUCCESS ✓
112- Running test_fake_exports_faked_in_subshells ... SUCCESS ✓
113- Running test_fake_transmits_params_to_fake_code ... SUCCESS ✓
114- Running test_should_pretty_format_even_when_LANG_is_unset ... SUCCESS ✓
115- Overall result: SUCCESS ✓
91+ Running test_assert_equals_fails_when_not_equal ... SUCCESS
92+ Running test_assert_equals_succeed_when_equal ... SUCCESS
93+ Running test_assert_fails ... SUCCESS
94+ Running test_assert_fails_fails ... SUCCESS
95+ Running test_assert_fails_succeeds ... SUCCESS
96+ Running test_assert_no_diff_fails_when_diff ... SUCCESS
97+ Running test_assert_no_diff_succeeds_when_no_diff ... SUCCESS
98+ Running test_assert_not_equals_fails_when_equal ... SUCCESS
99+ Running test_assert_not_equals_succeeds_when_not_equal ... SUCCESS
100+ Running test_assert_shows_stderr_on_failure ... SUCCESS
101+ Running test_assert_shows_stdout_on_failure ... SUCCESS
102+ Running test_assert_status_code_fails ... SUCCESS
103+ Running test_assert_status_code_succeeds ... SUCCESS
104+ Running test_assert_succeeds ... SUCCESS
105+ Running test_fail_fails ... SUCCESS
106+ Running test_fail_prints_failure_message ... SUCCESS
107+ Running test_fail_prints_where_is_error ... SUCCESS
108+ Running test_fake_actually_fakes_the_command ... SUCCESS
109+ Running test_fake_can_fake_inline ... SUCCESS
110+ Running test_fake_echo_stdin_when_no_params ... SUCCESS
111+ Running test_fake_exports_faked_in_subshells ... SUCCESS
112+ Running test_fake_transmits_params_to_fake_code ... SUCCESS
113+ Running test_should_pretty_format_even_when_LANG_is_unset ... SUCCESS
114+ Overall result: SUCCESS
116115```
117116
118117You might also want to run only specific tests, you may do so with the
@@ -125,22 +124,22 @@ functions against this pattern.
125124
126125```output
127126Running tests in tests/test_core.sh
128- Running test_assert_equals_fails_when_not_equal ... SUCCESS ✓
129- Running test_assert_equals_succeed_when_equal ... SUCCESS ✓
130- Running test_assert_fails ... SUCCESS ✓
131- Running test_assert_fails_fails ... SUCCESS ✓
132- Running test_assert_fails_succeeds ... SUCCESS ✓
133- Running test_assert_no_diff_fails_when_diff ... SUCCESS ✓
134- Running test_assert_no_diff_succeeds_when_no_diff ... SUCCESS ✓
135- Running test_assert_not_equals_fails_when_equal ... SUCCESS ✓
136- Running test_assert_not_equals_succeeds_when_not_equal ... SUCCESS ✓
137- Running test_assert_shows_stderr_on_failure ... SUCCESS ✓
138- Running test_assert_shows_stdout_on_failure ... SUCCESS ✓
139- Running test_assert_status_code_fails ... SUCCESS ✓
140- Running test_assert_status_code_succeeds ... SUCCESS ✓
141- Running test_assert_succeeds ... SUCCESS ✓
142- Running test_fail_fails ... SUCCESS ✓
143- Overall result: SUCCESS ✓
127+ Running test_assert_equals_fails_when_not_equal ... SUCCESS
128+ Running test_assert_equals_succeed_when_equal ... SUCCESS
129+ Running test_assert_fails ... SUCCESS
130+ Running test_assert_fails_fails ... SUCCESS
131+ Running test_assert_fails_succeeds ... SUCCESS
132+ Running test_assert_no_diff_fails_when_diff ... SUCCESS
133+ Running test_assert_no_diff_succeeds_when_no_diff ... SUCCESS
134+ Running test_assert_not_equals_fails_when_equal ... SUCCESS
135+ Running test_assert_not_equals_succeeds_when_not_equal ... SUCCESS
136+ Running test_assert_shows_stderr_on_failure ... SUCCESS
137+ Running test_assert_shows_stdout_on_failure ... SUCCESS
138+ Running test_assert_status_code_fails ... SUCCESS
139+ Running test_assert_status_code_succeeds ... SUCCESS
140+ Running test_assert_succeeds ... SUCCESS
141+ Running test_fail_fails ... SUCCESS
142+ Overall result: SUCCESS
144143```
145144
146145*bash_unit* supports the http://testanything.org/[Test Anything Protocol] so you can ask for a tap formatted
@@ -152,29 +151,28 @@ output with the _-f_ option.
152151
153152```output
154153# Running tests in tests/test_core.sh
155- ok ✓ test_assert_equals_fails_when_not_equal
156- ok ✓ test_assert_equals_succeed_when_equal
157- ok ✓ test_assert_fails
158- ok ✓ test_assert_fails_fails
159- ok ✓ test_assert_fails_succeeds
160- ok ✓ test_assert_no_diff_fails_when_diff
161- ok ✓ test_assert_no_diff_succeeds_when_no_diff
162- ok ✓ test_assert_not_equals_fails_when_equal
163- ok ✓ test_assert_not_equals_succeeds_when_not_equal
164- ok ✓ test_assert_shows_stderr_on_failure
165- ok ✓ test_assert_shows_stdout_on_failure
166- ok ✓ test_assert_status_code_fails
167- ok ✓ test_assert_status_code_succeeds
168- ok ✓ test_assert_succeeds
169- ok ✓ test_bash_unit_changes_cwd_to_current_test_file_directory
170- ok ✓ test_fail_fails
171- ok ✓ test_fail_prints_failure_message
172- ok ✓ test_fail_prints_where_is_error
173- ok ✓ test_fake_actually_fakes_the_command
174- ok ✓ test_fake_can_fake_inline
175- ok ✓ test_fake_echo_stdin_when_no_params
176- ok ✓ test_fake_exports_faked_in_subshells
177- ok ✓ test_fake_transmits_params_to_fake_code
154+ ok - test_assert_equals_fails_when_not_equal
155+ ok - test_assert_equals_succeed_when_equal
156+ ok - test_assert_fails
157+ ok - test_assert_fails_fails
158+ ok - test_assert_fails_succeeds
159+ ok - test_assert_no_diff_fails_when_diff
160+ ok - test_assert_no_diff_succeeds_when_no_diff
161+ ok - test_assert_not_equals_fails_when_equal
162+ ok - test_assert_not_equals_succeeds_when_not_equal
163+ ok - test_assert_shows_stderr_on_failure
164+ ok - test_assert_shows_stdout_on_failure
165+ ok - test_assert_status_code_fails
166+ ok - test_assert_status_code_succeeds
167+ ok - test_assert_succeeds
168+ ok - test_fail_fails
169+ ok - test_fail_prints_failure_message
170+ ok - test_fail_prints_where_is_error
171+ ok - test_fake_actually_fakes_the_command
172+ ok - test_fake_can_fake_inline
173+ ok - test_fake_echo_stdin_when_no_params
174+ ok - test_fake_exports_faked_in_subshells
175+ ok - test_fake_transmits_params_to_fake_code
178176ok - test_should_pretty_format_even_when_LANG_is_unset
179177```
180178
@@ -413,29 +411,6 @@ doc:2:test_obvious_equality_with_assert_not_equals()
413411 Running test_obvious_inequality_with_assert_not_equals ... SUCCESS
414412```
415413
416- === *assert_no_diff*
417-
418- assert_no_diff <expected> <actual> [message]
419-
420- Assert for equality of content between the two files _expected_ and _actual_.
421-
422- ```test
423- test_obvious_diff_with_assert_no_diff(){
424- assert_no_diff <(echo foo) <(echo bar) "dynamic files should have no difference"
425- }
426- test_obvious_equality_with_assert_no_diff(){
427- assert_no_diff "$0" "$0"
428- }
429- ```
430-
431- ```output
432- Running test_obvious_diff_with_assert_no_diff ... FAILURE ✗
433- dynamic files should have no difference
434- expected '/dev/fd/62' to be identical to '/dev/fd/63' but was different
435- doc:2:test_obvious_diff_with_assert_no_diff()
436- Running test_obvious_equality_with_assert_no_diff ... SUCCESS ✓
437- ```
438-
439414== *fake* function
440415
441416 fake <command> [replacement code]
0 commit comments