stas 01/11/11 18:57:59
Modified: perl-framework/Apache-Test/lib/Apache TestUtil.pm
Log:
- document regex comparison support in t_is_equal()
Revision Changes Path
1.13 +7 -3
httpd-test/perl-framework/Apache-Test/lib/Apache/TestUtil.pm
Index: TestUtil.pm
===================================================================
RCS file:
/home/cvs/httpd-test/perl-framework/Apache-Test/lib/Apache/TestUtil.pm,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- TestUtil.pm 2001/11/11 19:18:16 1.12
+++ TestUtil.pm 2001/11/12 02:57:59 1.13
@@ -154,7 +154,6 @@
}
}
elsif ($ref_a eq 'Regexp') {
- #t_cmp(qr{^Apache}, $server_version)
return $b =~ $a;
}
else {
@@ -323,8 +322,13 @@
t_is_equal() compares any two datastructures and returns 1 if they are
exactly the same, otherwise 0. The datastructures can be nested
-hashes, arrays, scalars, undefs or a combination of any of these. See
-t_cmp() for more examples.
+hashes, arrays, scalars, undefs or a combination of any of these. See
+t_cmp() for an example.
+
+If C<$a> is a regex reference, the regex comparison C<$b =~ $a> is
+performed. For example:
+
+ t_is_equal(qr{^Apache}, $server_version);
If comparing non-scalars make sure to pass the references to the
datastructures.