You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is it possible to somehow use dynamic parameters called from a shell script?
test_spec.sh
Describe 'complex matrix from external commands'
Parameters:dynamic
"$SHELLSPEC_HELPERDIR/support/dynamic_matrix.sh"
End
It "does thing --with-param $2"
BeforeCall $1
When call bin/thing --with-param $2
The status should equal $2
The line 1 of stdout should equal "something"
End
End
dynamic_matrix.sh
array1=("a1""b1")
array2=("a2""b2")
foriin"${array1[@]}";doforjin"${array2[@]}";do# get data from either array
var_from_array1=$(echo "$i"| awk '{print $1}')
var_from_array2=$(echo "$j"| awk '{print $1}')echo %data "$var_from_array1""$var_from_array2"donedone
Essentially, I want to feed the matrix with dynamic data from a script and then run several tasks.
Describe 'complex matrix from external commands'
Parameters:matrix
foo bar
for line in $(command --output); do
%data $my $space $separated $output
done
End
It "does thing --with-param $2"
BeforeCall $1
When call bin/thing --with-param $2
The status should equal $2
The line 1 of stdout should equal "something"
End
It "does more --with-param $3"
When call bin/more --with-param $3
The status should equal $2
End
End
Is it possible to somehow use dynamic parameters called from a shell script?
It looks like it runs some tests, but fails:
The text was updated successfully, but these errors were encountered: