httpd-test-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stas Bekman <s...@stason.org>
Subject extending t_cmp to handle !t_cmp?
Date Fri, 26 Nov 2004 20:02:39 GMT
Most of the time when one needs to check when two values are different one 
could run:

   ok !t_cmp(...)

but the diagnostics is wrong, since received will be matching 'expected'

For example:

   ok !t_cmp $received, qr/message/

# testing : whatever
# expected: (?-xism:message)
# received: [...] [notice] [client 127.0.0.1] message must not appear!
not ok 32

so the verbose output is confusing.

so we probably need to introduce a new directive t_cmp_no() or something 
similar which will be run as:

   ok t_cmp_no $received, qr/message/

and log as:

# testing : whatever
# expected: ! (?-xism:message)
# received: [...] [notice] [client 127.0.0.1] message must not appear!
not ok 32

or something like that. internally it'd run !~, neq and != depending on 
the arguments.

Comments?

-- 
__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com

Mime
View raw message