@@ -114,6 +114,7 @@ Running tests in tests/test_core.sh
114114 Running test_fake_echo_stdin_when_no_params ... SUCCESS
115115 Running test_fake_exports_faked_in_subshells ... SUCCESS
116116 Running test_fake_transmits_params_to_fake_code ... SUCCESS
117+ Running test_fake_transmits_params_to_fake_code_as_array ... SUCCESS
117118 Running test_should_pretty_format_even_when_LANG_is_unset ... SUCCESS
118119Overall result: SUCCESS
119120```
@@ -185,6 +186,7 @@ ok - test_fake_can_fake_inline
185186ok - test_fake_echo_stdin_when_no_params
186187ok - test_fake_exports_faked_in_subshells
187188ok - test_fake_transmits_params_to_fake_code
189+ ok - test_fake_transmits_params_to_fake_code_as_array
188190ok - test_should_pretty_format_even_when_LANG_is_unset
189191```
190192
@@ -664,7 +666,7 @@ test_code_gives_ps_appropriate_parameters() {
66466624162 pts/7 00:00:00 ps
665667 8387 ? 0:00 /usr/sbin/apache2 -k start
666668EOF
667- assert_equals ax "$FAKE_PARAMS"
669+ assert_equals ax "${ FAKE_PARAMS[@]} "
668670 }
669671 export -f _ps
670672 fake ps _ps
@@ -698,7 +700,7 @@ code() {
698700
699701test_code_gives_ps_appropriate_parameters() {
700702 _ps() {
701- assert_equals ax "$FAKE_PARAMS"
703+ assert_equals ax "${ FAKE_PARAMS[@]} "
702704 }
703705 export -f _ps
704706 fake ps _ps
@@ -728,7 +730,7 @@ code() {
728730
729731test_code_gives_ps_appropriate_parameters() {
730732 _ps() {
731- echo $FAKE_PARAMS > /tmp/fake_params
733+ echo ${ FAKE_PARAMS[@]} > /tmp/fake_params
732734 }
733735 export -f _ps
734736 fake ps _ps
@@ -763,7 +765,7 @@ code() {
763765}
764766
765767test_code_gives_ps_appropriate_parameters() {
766- fake ps 'echo $FAKE_PARAMS >/tmp/fake_params'
768+ fake ps 'echo ${ FAKE_PARAMS[@]} >/tmp/fake_params'
767769
768770 code || true
769771
@@ -792,7 +794,7 @@ test_get_data_from_fake() {
792794 #Fasten you seat belt ...
793795 coproc cat
794796 exec {test_channel}>&${COPROC[1]}
795- fake ps 'echo $FAKE_PARAMS >&$test_channel'
797+ fake ps 'echo ${ FAKE_PARAMS[@]} >&$test_channel'
796798
797799 code || true
798800
0 commit comments