testify icon indicating copy to clipboard operation
testify copied to clipboard

assert.Regexp: Document allowed rx argument values #268

Open brackendawson opened this issue 3 months ago • 0 comments

Reference: https://github.com/Antonboom/testifylint/issues/81#issuecomment-3290922001

The Regexp and NotRegexp assertion accept interface{} for the rx (expression) argument. This is insane but we can't change it because it would be a breaking change. The documentation for these functions should be changed to explain that the value should be a *regexp.Regexp, but that if any other type is provided then the %v format of the value will be compiled as a new expression.

brackendawson avatar Sep 15 '25 08:09 brackendawson