File tree Expand file tree Collapse file tree 2 files changed +12
-14
lines changed
Expand file tree Collapse file tree 2 files changed +12
-14
lines changed Original file line number Diff line number Diff line change @@ -61,6 +61,16 @@ function helper::interpolate_function_name() {
6161 echo " $result "
6262}
6363
64+ function helper::decode_base64() {
65+ local value=" $1 "
66+
67+ if command -v base64 > /dev/null; then
68+ echo " $value " | base64 -d
69+ else
70+ echo " $value " | openssl enc -d -base64
71+ fi
72+ }
73+
6474function helper::check_duplicate_functions() {
6575 local script=" $1 "
6676
Original file line number Diff line number Diff line change @@ -297,13 +297,7 @@ function runner::run_test() {
297297 encoded_test_title=" ${test_execution_result##*## TEST_TITLE=} "
298298 encoded_test_title=" ${encoded_test_title%%##* } "
299299 local test_title=" "
300- if [[ -n " $encoded_test_title " ]]; then
301- if command -v base64 > /dev/null; then
302- test_title=" $( echo " $encoded_test_title " | base64 -d) "
303- else
304- test_title=" $( echo " $encoded_test_title " | openssl enc -d -base64) "
305- fi
306- fi
300+ [[ -n " $encoded_test_title " ]] && test_title=" $( helper::decode_base64 " $encoded_test_title " ) "
307301
308302 state::set_test_title " $test_title "
309303 local label
@@ -373,13 +367,7 @@ function runner::decode_subshell_output() {
373367
374368 local test_output_base64=" ${test_execution_result##*## TEST_OUTPUT=} "
375369 test_output_base64=" ${test_output_base64%%##* } "
376-
377- local subshell_output
378- if command -v base64 > /dev/null; then
379- echo " $test_output_base64 " | base64 -d
380- else
381- echo " $test_output_base64 " | openssl enc -d -base64
382- fi
370+ helper::decode_base64 " $test_output_base64 "
383371}
384372
385373function runner::parse_result() {
You can’t perform that action at this time.
0 commit comments