Github user geomacy commented on the issue:
https://github.com/apache/brooklyn-server/pull/589
I've gone 360 degrees on this after a bit more thought and investigation!
I was going to say
> Actually now that you mention it I think that's a good idea. i.e. Leave
"matches" the way it is, just doing a `Matcher.match()` (without us modifying
things with MULTILINE or DOTALL, which could confuse at times), but also
provide `containsMatch` which gives us `Matcher.find()`, so we have both
capabilities on offer.
But I've actually given up on that - `find` is of most use when you're
wanting to iterate over the matches. Fair enough we could provide it as an
alternative to `matches` that would go find the first match in the lines of
output and return true if it's in there somewhere. But it seems to leave us
two assertions that do very much the same thing, which is not very minimal.
So I'm going to go radical and suggest we do nothing to the code, and just
update the docs to mention the issue of matching multi lines and give examples
of how to do that:
```
type: TestSshCommand
brooklyn.config:
assert.out:
- matches: "(?s).*foo.*"
```
What do you say?
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---