Return-Path: Delivered-To: apmail-httpd-test-cvs-archive@httpd.apache.org Received: (qmail 24820 invoked by uid 500); 12 Nov 2001 03:10:35 -0000 Mailing-List: contact test-cvs-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: test-dev@httpd.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list test-cvs@httpd.apache.org Received: (qmail 24809 invoked from network); 12 Nov 2001 03:10:35 -0000 Date: 12 Nov 2001 02:57:59 -0000 Message-ID: <20011112025759.47763.qmail@icarus.apache.org> From: stas@apache.org To: httpd-test-cvs@apache.org Subject: cvs commit: httpd-test/perl-framework/Apache-Test/lib/Apache TestUtil.pm X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N 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.