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>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.