22.\" Title: bash_unit
33.\" Author: [see the "AUTHOR(S)" section]
44.\" Generator: Asciidoctor 2.0.16
5- .\" Date: 2021-10-14
5+ .\" Date: 2021-11-07
66.\" Manual: \ \&
77.\" Source: \ \&
88.\" Language: English
99.\"
10- .TH "BASH_UNIT" "1" "2021-10-14 " "\ \& " "\ \& "
10+ .TH "BASH_UNIT" "1" "2021-11-07 " "\ \& " "\ \& "
1111.ie \n( .g .ds Aq \(aq
1212.el .ds Aq '
1313.ss \n[ .ss ] 0
@@ -84,30 +84,30 @@ To run tests, simply call \fBbash_unit\fP with all your tests files as parameter
8484.nf
8585.fam C
8686Running tests in tests/test_core.sh
87- Running test_assert_equals_fails_when_not_equal ... SUCCESS ✓
88- Running test_assert_equals_succeed_when_equal ... SUCCESS ✓
89- Running test_assert_fails ... SUCCESS ✓
90- Running test_assert_fails_fails ... SUCCESS ✓
91- Running test_assert_fails_succeeds ... SUCCESS ✓
92- Running test_assert_no_diff_fails_when_diff ... SUCCESS ✓
93- Running test_assert_no_diff_succeeds_when_no_diff ... SUCCESS ✓
94- Running test_assert_not_equals_fails_when_equal ... SUCCESS ✓
95- Running test_assert_not_equals_succeeds_when_not_equal ... SUCCESS ✓
96- Running test_assert_shows_stderr_on_failure ... SUCCESS ✓
97- Running test_assert_shows_stdout_on_failure ... SUCCESS ✓
98- Running test_assert_status_code_fails ... SUCCESS ✓
99- Running test_assert_status_code_succeeds ... SUCCESS ✓
100- Running test_assert_succeeds ... SUCCESS ✓
101- Running test_bash_unit_changes_cwd_to_current_test_file_directory ... SUCCESS ✓
102- Running test_fail_fails ... SUCCESS ✓
103- Running test_fail_prints_failure_message ... SUCCESS ✓
104- Running test_fail_prints_where_is_error ... SUCCESS ✓
105- Running test_fake_actually_fakes_the_command ... SUCCESS ✓
106- Running test_fake_can_fake_inline ... SUCCESS ✓
107- Running test_fake_echo_stdin_when_no_params ... SUCCESS ✓
108- Running test_fake_exports_faked_in_subshells ... SUCCESS ✓
109- Running test_fake_transmits_params_to_fake_code ... SUCCESS ✓
110- Overall result: SUCCESS ✓
87+ Running test_assert_equals_fails_when_not_equal ... SUCCESS
88+ Running test_assert_equals_succeed_when_equal ... SUCCESS
89+ Running test_assert_fails ... SUCCESS
90+ Running test_assert_fails_fails ... SUCCESS
91+ Running test_assert_fails_succeeds ... SUCCESS
92+ Running test_assert_no_diff_fails_when_diff ... SUCCESS
93+ Running test_assert_no_diff_succeeds_when_no_diff ... SUCCESS
94+ Running test_assert_not_equals_fails_when_equal ... SUCCESS
95+ Running test_assert_not_equals_succeeds_when_not_equal ... SUCCESS
96+ Running test_assert_shows_stderr_on_failure ... SUCCESS
97+ Running test_assert_shows_stdout_on_failure ... SUCCESS
98+ Running test_assert_status_code_fails ... SUCCESS
99+ Running test_assert_status_code_succeeds ... SUCCESS
100+ Running test_assert_succeeds ... SUCCESS
101+ Running test_fail_fails ... SUCCESS
102+ Running test_fail_prints_failure_message ... SUCCESS
103+ Running test_fail_prints_where_is_error ... SUCCESS
104+ Running test_fake_actually_fakes_the_command ... SUCCESS
105+ Running test_fake_can_fake_inline ... SUCCESS
106+ Running test_fake_echo_stdin_when_no_params ... SUCCESS
107+ Running test_fake_exports_faked_in_subshells ... SUCCESS
108+ Running test_fake_transmits_params_to_fake_code ... SUCCESS
109+ Running test_should_pretty_format_even_when_LANG_is_unset ... SUCCESS
110+ Overall result: SUCCESS
111111.fam
112112.fi
113113.if n .RE
@@ -128,22 +128,22 @@ functions against this pattern.
128128.nf
129129.fam C
130130Running tests in tests/test_core.sh
131- Running test_assert_equals_fails_when_not_equal ... SUCCESS ✓
132- Running test_assert_equals_succeed_when_equal ... SUCCESS ✓
133- Running test_assert_fails ... SUCCESS ✓
134- Running test_assert_fails_fails ... SUCCESS ✓
135- Running test_assert_fails_succeeds ... SUCCESS ✓
136- Running test_assert_no_diff_fails_when_diff ... SUCCESS ✓
137- Running test_assert_no_diff_succeeds_when_no_diff ... SUCCESS ✓
138- Running test_assert_not_equals_fails_when_equal ... SUCCESS ✓
139- Running test_assert_not_equals_succeeds_when_not_equal ... SUCCESS ✓
140- Running test_assert_shows_stderr_on_failure ... SUCCESS ✓
141- Running test_assert_shows_stdout_on_failure ... SUCCESS ✓
142- Running test_assert_status_code_fails ... SUCCESS ✓
143- Running test_assert_status_code_succeeds ... SUCCESS ✓
144- Running test_assert_succeeds ... SUCCESS ✓
145- Running test_fail_fails ... SUCCESS ✓
146- Overall result: SUCCESS ✓
131+ Running test_assert_equals_fails_when_not_equal ... SUCCESS
132+ Running test_assert_equals_succeed_when_equal ... SUCCESS
133+ Running test_assert_fails ... SUCCESS
134+ Running test_assert_fails_fails ... SUCCESS
135+ Running test_assert_fails_succeeds ... SUCCESS
136+ Running test_assert_no_diff_fails_when_diff ... SUCCESS
137+ Running test_assert_no_diff_succeeds_when_no_diff ... SUCCESS
138+ Running test_assert_not_equals_fails_when_equal ... SUCCESS
139+ Running test_assert_not_equals_succeeds_when_not_equal ... SUCCESS
140+ Running test_assert_shows_stderr_on_failure ... SUCCESS
141+ Running test_assert_shows_stdout_on_failure ... SUCCESS
142+ Running test_assert_status_code_fails ... SUCCESS
143+ Running test_assert_status_code_succeeds ... SUCCESS
144+ Running test_assert_succeeds ... SUCCESS
145+ Running test_fail_fails ... SUCCESS
146+ Overall result: SUCCESS
147147.fam
148148.fi
149149.if n .RE
@@ -165,29 +165,29 @@ output with the \fI\-f\fP option.
165165.nf
166166.fam C
167167# Running tests in tests/test_core.sh
168- ok ✓ test_assert_equals_fails_when_not_equal
169- ok ✓ test_assert_equals_succeed_when_equal
170- ok ✓ test_assert_fails
171- ok ✓ test_assert_fails_fails
172- ok ✓ test_assert_fails_succeeds
173- ok ✓ test_assert_no_diff_fails_when_diff
174- ok ✓ test_assert_no_diff_succeeds_when_no_diff
175- ok ✓ test_assert_not_equals_fails_when_equal
176- ok ✓ test_assert_not_equals_succeeds_when_not_equal
177- ok ✓ test_assert_shows_stderr_on_failure
178- ok ✓ test_assert_shows_stdout_on_failure
179- ok ✓ test_assert_status_code_fails
180- ok ✓ test_assert_status_code_succeeds
181- ok ✓ test_assert_succeeds
182- ok ✓ test_bash_unit_changes_cwd_to_current_test_file_directory
183- ok ✓ test_fail_fails
184- ok ✓ test_fail_prints_failure_message
185- ok ✓ test_fail_prints_where_is_error
186- ok ✓ test_fake_actually_fakes_the_command
187- ok ✓ test_fake_can_fake_inline
188- ok ✓ test_fake_echo_stdin_when_no_params
189- ok ✓ test_fake_exports_faked_in_subshells
190- ok ✓ test_fake_transmits_params_to_fake_code
168+ ok \- test_assert_equals_fails_when_not_equal
169+ ok \- test_assert_equals_succeed_when_equal
170+ ok \- test_assert_fails
171+ ok \- test_assert_fails_fails
172+ ok \- test_assert_fails_succeeds
173+ ok \- test_assert_no_diff_fails_when_diff
174+ ok \- test_assert_no_diff_succeeds_when_no_diff
175+ ok \- test_assert_not_equals_fails_when_equal
176+ ok \- test_assert_not_equals_succeeds_when_not_equal
177+ ok \- test_assert_shows_stderr_on_failure
178+ ok \- test_assert_shows_stdout_on_failure
179+ ok \- test_assert_status_code_fails
180+ ok \- test_assert_status_code_succeeds
181+ ok \- test_assert_succeeds
182+ ok \- test_fail_fails
183+ ok \- test_fail_prints_failure_message
184+ ok \- test_fail_prints_where_is_error
185+ ok \- test_fake_actually_fakes_the_command
186+ ok \- test_fake_can_fake_inline
187+ ok \- test_fake_echo_stdin_when_no_params
188+ ok \- test_fake_exports_faked_in_subshells
189+ ok \- test_fake_transmits_params_to_fake_code
190+ ok \- test_should_pretty_format_even_when_LANG_is_unset
191191.fam
192192.fi
193193.if n .RE
@@ -518,42 +518,6 @@ doc:2:test_obvious_equality_with_assert_not_equals()
518518.fam
519519.fi
520520.if n .RE
521- .SS "\fB assert_no_diff \fP "
522- .sp
523- .if n .RS 4
524- .nf
525- .fam C
526- assert_no_diff <expected> <actual> [message]
527- .fam
528- .fi
529- .if n .RE
530- .sp
531- Assert for equality of content between the two files \fI expected \fP and \fI actual \fP .
532- .sp
533- .if n .RS 4
534- .nf
535- .fam C
536- test_obvious_diff_with_assert_no_diff(){
537- assert_no_diff <(echo foo) <(echo bar) "dynamic files should have no difference"
538- }
539- test_obvious_equality_with_assert_no_diff(){
540- assert_no_diff "$0" "$0"
541- }
542- .fam
543- .fi
544- .if n .RE
545- .sp
546- .if n .RS 4
547- .nf
548- .fam C
549- Running test_obvious_diff_with_assert_no_diff ... FAILURE ✗
550- dynamic files should have no difference
551- expected \*( Aq /dev/fd/62\*( Aq to be identical to \*( Aq /dev/fd/63\*( Aq but was different
552- doc:2:test_obvious_diff_with_assert_no_diff()
553- Running test_obvious_equality_with_assert_no_diff ... SUCCESS ✓
554- .fam
555- .fi
556- .if n .RE
557521.SH "\fB FAKE \fP FUNCTION"
558522.sp
559523.if n .RS 4
0 commit comments