@@ -114,6 +114,7 @@ Running tests in tests/test_core.sh
114
114
Running test_fake_echo_stdin_when_no_params ... SUCCESS
115
115
Running test_fake_exports_faked_in_subshells ... SUCCESS
116
116
Running test_fake_transmits_params_to_fake_code ... SUCCESS
117
+ Running test_fake_transmits_params_to_fake_code_as_array ... SUCCESS
117
118
Running test_should_pretty_format_even_when_LANG_is_unset ... SUCCESS
118
119
Overall result: SUCCESS
119
120
```
@@ -185,6 +186,7 @@ ok - test_fake_can_fake_inline
185
186
ok - test_fake_echo_stdin_when_no_params
186
187
ok - test_fake_exports_faked_in_subshells
187
188
ok - test_fake_transmits_params_to_fake_code
189
+ ok - test_fake_transmits_params_to_fake_code_as_array
188
190
ok - test_should_pretty_format_even_when_LANG_is_unset
189
191
```
190
192
@@ -664,7 +666,7 @@ test_code_gives_ps_appropriate_parameters() {
664
666
24162 pts/7 00:00:00 ps
665
667
8387 ? 0:00 /usr/sbin/apache2 -k start
666
668
EOF
667
- assert_equals ax "$FAKE_PARAMS"
669
+ assert_equals ax "${ FAKE_PARAMS[@]} "
668
670
}
669
671
export -f _ps
670
672
fake ps _ps
@@ -698,7 +700,7 @@ code() {
698
700
699
701
test_code_gives_ps_appropriate_parameters() {
700
702
_ps() {
701
- assert_equals ax "$FAKE_PARAMS"
703
+ assert_equals ax "${ FAKE_PARAMS[@]} "
702
704
}
703
705
export -f _ps
704
706
fake ps _ps
@@ -728,7 +730,7 @@ code() {
728
730
729
731
test_code_gives_ps_appropriate_parameters() {
730
732
_ps() {
731
- echo $FAKE_PARAMS > /tmp/fake_params
733
+ echo ${ FAKE_PARAMS[@]} > /tmp/fake_params
732
734
}
733
735
export -f _ps
734
736
fake ps _ps
@@ -763,7 +765,7 @@ code() {
763
765
}
764
766
765
767
test_code_gives_ps_appropriate_parameters() {
766
- fake ps 'echo $FAKE_PARAMS >/tmp/fake_params'
768
+ fake ps 'echo ${ FAKE_PARAMS[@]} >/tmp/fake_params'
767
769
768
770
code || true
769
771
@@ -792,7 +794,7 @@ test_get_data_from_fake() {
792
794
#Fasten you seat belt ...
793
795
coproc cat
794
796
exec {test_channel}>&${COPROC[1]}
795
- fake ps 'echo $FAKE_PARAMS >&$test_channel'
797
+ fake ps 'echo ${ FAKE_PARAMS[@]} >&$test_channel'
796
798
797
799
code || true
798
800
0 commit comments