brooklyn-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From geomacy <>
Subject [GitHub] brooklyn-server issue #589: yaml-test assertions: fix use of “matches”
Date Fri, 10 Mar 2017 20:37:53 GMT
Github user geomacy commented on the issue:
    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
    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
      - 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 or file a JIRA ticket
with INFRA.

View raw message