@@ -333,7 +333,7 @@ function assert_string_starts_with() {
333333 local actual
334334 actual=$( printf ' %s\n' " ${actual_arr[@]} " )
335335
336- if ! [[ $actual =~ ^ " $expected " * ]]; then
336+ if [[ $actual != " $expected " * ]]; then
337337 local label
338338 label=" $( helper::normalize_test_function_name " ${FUNCNAME[1]} " ) "
339339 state::add_assertions_failed
@@ -348,7 +348,7 @@ function assert_string_not_starts_with() {
348348 local expected=" $1 "
349349 local actual=" $2 "
350350
351- if [[ $actual =~ ^ " $expected " * ]]; then
351+ if [[ $actual == " $expected " * ]]; then
352352 local label
353353 label=" $( helper::normalize_test_function_name " ${FUNCNAME[1]} " ) "
354354 state::add_assertions_failed
@@ -365,7 +365,7 @@ function assert_string_ends_with() {
365365 local actual
366366 actual=$( printf ' %s\n' " ${actual_arr[@]} " )
367367
368- if ! [[ $actual =~ . * " $expected " $ ]]; then
368+ if [[ $actual != * " $expected " ]]; then
369369 local label
370370 label=" $( helper::normalize_test_function_name " ${FUNCNAME[1]} " ) "
371371 state::add_assertions_failed
@@ -382,7 +382,7 @@ function assert_string_not_ends_with() {
382382 local actual
383383 actual=$( printf ' %s\n' " ${actual_arr[@]} " )
384384
385- if [[ $actual =~ . * " $expected " $ ]]; then
385+ if [[ $actual == * " $expected " ]]; then
386386 local label
387387 label=" $( helper::normalize_test_function_name " ${FUNCNAME[1]} " ) "
388388 state::add_assertions_failed
0 commit comments