Skip to content

regexp tests failing with assert_test_fail <<'ERR_MSG'' failed after fixes for Bash 5.3 #88

Closed

Description

@gioele

Hi, bats-assert's tests (v2.2.3) are failing on Debian testing/unstable:

not ok 44 assert_line() --regexp <regexp>: returns 1 and displays an error message if <regexp> is not a valid extended regular expression
# (from function `assert_test_fail' in file test/test_helper.bash, line 29,
#  in test file test/assert_line.bats, line 340)
#   `assert_test_fail <<'ERR_MSG'' failed

Environment

  • Bash 5.3.3(1)
  • bats 1.12.0
  • bats-support 0.3.0

Activity

  1. gioele commented on Oct 13, 2025

    @gioele
    Author

    The test fails to fail because the output message on Debian (and, in general, on libc-based systems) is slightly different from what has been reported in #83 and implemented in #84.

    $ [[ '' =~ [.* ]]
    bash: [[: invalid regular expression `[.*': Unmatched [, [^, [:, [., or [=
    
  2. martin-schulze-vireso commented on Oct 14, 2025

    @martin-schulze-vireso
    Member

    Thanks for the report. I should have anticipated that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions