@@ -34,7 +34,7 @@ function bashunit::mock() {
3434 if [ $# -gt 0 ]; then
3535 eval " function $command () { $* \"\$ @\" ; }"
3636 else
37- eval " function $command () { echo \" $( $CAT ) \" ; }"
37+ eval " function $command () { builtin echo \" $( $CAT ) \" ; }"
3838 fi
3939
4040 export -f " ${command?} "
@@ -61,14 +61,14 @@ function bashunit::spy() {
6161 local serialized=\"\"
6262 local arg
6363 for arg in \"\$ @\" ; do
64- serialized=\"\$ serialized\$ (printf '%q' \"\$ arg\" )$'\\ x1f'\"
64+ serialized=\"\$ serialized\$ (builtin printf '%q' \"\$ arg\" )$'\\ x1f'\"
6565 done
6666 serialized=\$ {serialized%$'\\ x1f'}
67- printf '%s\x1e%s\\ n' \"\$ raw\" \"\$ serialized\" >> '$params_file '
67+ builtin printf '%s\x1e%s\\ n' \"\$ raw\" \"\$ serialized\" >> '$params_file '
6868 local _c
69- _c=\$ (cat '$times_file ' 2>/dev/null || echo 0)
69+ _c=\$ (cat '$times_file ' 2>/dev/null || builtin echo 0)
7070 _c=\$ ((_c+1))
71- echo \"\$ _c\" > '$times_file '
71+ builtin echo \"\$ _c\" > '$times_file '
7272 }"
7373
7474 export -f " ${command?} "
@@ -83,7 +83,7 @@ function assert_have_been_called() {
8383 local file_var=" ${variable} _times_file"
8484 local times=0
8585 if [ -f " ${! file_var-} " ]; then
86- times=$( cat " ${! file_var} " 2> /dev/null || echo 0)
86+ times=$( cat " ${! file_var} " 2> /dev/null || builtin echo 0)
8787 fi
8888 local label=" ${2:- $(bashunit:: helper:: normalize_test_function_name " ${FUNCNAME[1]} " )} "
8989
@@ -141,7 +141,7 @@ function assert_have_been_called_times() {
141141 local file_var=" ${variable} _times_file"
142142 local times=0
143143 if [ -f " ${! file_var-} " ]; then
144- times=$( cat " ${! file_var} " 2> /dev/null || echo 0)
144+ times=$( cat " ${! file_var} " 2> /dev/null || builtin echo 0)
145145 fi
146146 local label=" ${3:- $(bashunit:: helper:: normalize_test_function_name " ${FUNCNAME[1]} " )} "
147147 if [ " $times " -ne " $expected_count " ]; then
@@ -170,7 +170,7 @@ function assert_have_been_called_nth_with() {
170170
171171 local times=0
172172 if [ -f " ${! times_file_var-} " ]; then
173- times=$( cat " ${! times_file_var} " 2> /dev/null || echo 0)
173+ times=$( cat " ${! times_file_var} " 2> /dev/null || builtin echo 0)
174174 fi
175175
176176 if [ " $nth " -gt " $times " ]; then
0 commit comments