Expectation::toMatchRegex
Member of Expectation
idl
Expectation.toMatchRegex, compare, $
/_expect_failureVerifies that an expectation value matches a regular expression.
Examples
idl
; verify there are numbers in our string
(it.expects('(42)')).toMatchRegex, '[0-9][0-9.]*'
(it.expects('no digits here'))._not_.toMatchRegex, '[0-9]+'Arguments
compare
requiredinputtype=StringSpecify a regular expression to find in the expectation value.
Keywords
_expect_failure {#kw-_expect_failure}
optionalinputtype=BooleanIf the test fails for some reason, set this to force passing because we expected failure. This keyword is for internal use only.