diff --git a/test/assert_line.bats b/test/assert_line.bats index 5a2f494..d42df0d 100755 --- a/test/assert_line.bats +++ b/test/assert_line.bats @@ -337,10 +337,17 @@ ERR_MSG run assert_line --regexp '[.*' if (( BASH_VERSINFO[0] > 5 || (BASH_VERSINFO[0] == 5 && BASH_VERSINFO[1] >=3) )); then - assert_test_fail <<'ERR_MSG' + [[ "$output" =~ "invalid regular expression "([^$'\n']+) ]] + cat < 5 || (BASH_VERSINFO[0] == 5 && BASH_VERSINFO[1] >=3) )); then - assert_test_fail <<'ERR_MSG' + [[ "$output" =~ "invalid regular expression "([^$'\n']+) ]] + assert_test_fail < 5 || (BASH_VERSINFO[0] == 5 && BASH_VERSINFO[1] >=3) )); then - assert_test_fail <<'ERR_MSG' + [[ "$output" =~ "invalid regular expression "([^$'\n']+) ]] + assert_test_fail < 5 || (BASH_VERSINFO[0] == 5 && BASH_VERSINFO[1] >=3) )); then - assert_test_fail <<'ERR_MSG' + [[ "$output" =~ "invalid regular expression "([^$'\n']+) ]] + assert_test_fail < 5 || (BASH_VERSINFO[0] == 5 && BASH_VERSINFO[1] >=3) )); then - assert_test_fail <<'ERR_MSG' + [[ "$output" =~ "invalid regular expression "([^$'\n']+) ]] + assert_test_fail < 5 || (BASH_VERSINFO[0] == 5 && BASH_VERSINFO[1] >=3) )); then - assert_test_fail <<'ERR_MSG' + [[ "$output" =~ "invalid regular expression "([^$'\n']+) ]] + assert_test_fail <: returns 1 and displays an error message if is not a valid extended regular expression' { run refute_output --regexp '[.*' if (( BASH_VERSINFO[0] > 5 || (BASH_VERSINFO[0] == 5 && BASH_VERSINFO[1] >=3) )); then - assert_test_fail <<'ERR_MSG' + [[ "$output" =~ "invalid regular expression "([^$'\n']+) ]] + assert_test_fail < 5 || (BASH_VERSINFO[0] == 5 && BASH_VERSINFO[1] >=3) )); then - assert_test_fail <<'ERR_MSG' + [[ "$output" =~ "invalid regular expression "([^$'\n']+) ]] + assert_test_fail < 5 || (BASH_VERSINFO[0] == 5 && BASH_VERSINFO[1] >=3) )); then - assert_test_fail <<'ERR_MSG' + [[ "$output" =~ "invalid regular expression "([^$'\n']+) ]] + assert_test_fail < 5 || (BASH_VERSINFO[0] == 5 && BASH_VERSINFO[1] >=3) )); then - assert_test_fail <<"ERR_MSG" + [[ "$output" =~ "invalid regular expression "([^$'\n']+) ]] + assert_test_fail <