Re: assertContains
Curt Arnold <[email protected]>
| Newsgroups | gmane.comp.web.dom.test-suites.general |
|---|---|
| Message-ID | <[email protected]> |
Jeroen van Rotterdam wrote:
> It would be helpfull if we would have an assertContains for a domstring.
>
> something like:
>
> <assertContains value="avalue" obj="astring" id="check_substring"/>
>
>
> jeroen
>
Instead of adding an explicit assertContains and assertContainsNot, I
added contains to the list of conditions which allows it to be used with
<assertTrue>, <assertFalse>, <if>, <or>, <and>, etc.
<assertTrue id="containsFoo">
<contains obj="stringDoc" substring='"foo"'/>
</assertTrue>
<assertFalse id="doesntContainFoo">
<contains obj="stringDoc" substring='"foo"'/>
</assertTrue>