@@ -36,15 +36,15 @@ error_output_buffer=""
3636temp_output_buffer=" "
3737
3838# Echo only if the verbose flag is set
39- verbose_echo () {
39+ function verbose_echo() {
4040 if [[ -n " $SPARK_TESTING_VERBOSE " ]]; then
4141 echo -e " $1 "
4242 fi
4343}
4444
4545# Collect error output for echoing at the end if tests fail
4646# This also echoes the given string if the verbose flag is set
47- log_error () {
47+ function log_error() {
4848 verbose_echo " $1 "
4949 if [[ -n " $error_output_buffer " ]]; then
5050 error_output_buffer=$( echo -e " $error_output_buffer \n$1 " )
@@ -54,7 +54,7 @@ log_error() {
5454}
5555
5656# Collect temporary output for logging
57- collect_temp_output () {
57+ function collect_temp_output() {
5858 if [[ -n " $temp_output_buffer " ]]; then
5959 temp_output_buffer=$( echo -e " $temp_output_buffer \n$1 " )
6060 else
@@ -63,7 +63,7 @@ collect_temp_output() {
6363}
6464
6565# Print the result of an individual test
66- echo_test_result () {
66+ function echo_test_result() {
6767 if [[ " $this_test_failed " == 1 ]]; then
6868 log_error " $temp_output_buffer "
6969 tests_failed=1
@@ -74,7 +74,7 @@ echo_test_result() {
7474
7575# Test parse_java_property. This takes in three parameters, the name of the config,
7676# the expected value, and whether or not to ignore whitespace (e.g. for multi-line).
77- test_parse_java_property () {
77+ function test_parse_java_property() {
7878 key=" $1 "
7979 expected_value=" $2 "
8080 ignore_whitespace=" $3 "
@@ -99,7 +99,7 @@ test_parse_java_property() {
9999
100100# Test split_java_options. This takes in three or more parameters, the name of the config,
101101# the expected number of java options, and values of the java options themselves.
102- test_split_java_options () {
102+ function test_split_java_options() {
103103 key=" $1 "
104104 expected_size=" $2 "
105105 expected_values=(" ${@: 3} " )
@@ -131,7 +131,7 @@ test_split_java_options() {
131131
132132# Test split_java_options. This takes in three or more parameters, the name of the config,
133133# the expected number of java options, and values of the java options themselves.
134- test_quote_java_property () {
134+ function test_quote_java_property() {
135135 key=" $1 "
136136 expected_size=" $2 "
137137 expected_values=(" ${@: 3} " )
0 commit comments