You are viewing a plain text version of this content. The canonical link for it is here.
Posted to docs-cvs@perl.apache.org by st...@apache.org on 2004/05/02 01:49:38 UTC
cvs commit: modperl-docs/src/docs/general/testing testing.pod
stas 2004/05/01 16:49:38
Modified: src/docs/general/testing testing.pod
Log:
update the module2client file name translation regex to reflect the
reality
Revision Changes Path
1.32 +9 -3 modperl-docs/src/docs/general/testing/testing.pod
Index: testing.pod
===================================================================
RCS file: /home/cvs/modperl-docs/src/docs/general/testing/testing.pod,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -u -r1.31 -r1.32
--- testing.pod 21 Jan 2004 22:18:53 -0000 1.31
+++ testing.pod 1 May 2004 23:49:38 -0000 1.32
@@ -1241,10 +1241,16 @@
The corresponding request part of the test is named just like the
response part, using the following translation:
- $response_test =~ s|t/[^/]+/Test([^/]+)/(.*).pm$|t/\L$1\E/$2.t|;
+ (my $tmp = $path) =~ s{t/[^/]+/(.*).pm}{$1.t};
+ my $path = catfile 't',
+ map { s/^test//i; lc $_ } split '::', $tmp;
-so for example I<t/response/TestApache/write.pm> becomes:
-I<t/apache/write.t>.
+Notice that the leading C</^test/> part is removed. Here are some
+examples of that translation:
+
+ t/response/MyApache/write.pm => t/myapache/write.t
+ t/response/TestApache/write.pm => t/apache/write.t
+ t/response/TestApache/Mar/write.pm => t/apache/mar/write.t
If we look at the autogenerated test I<t/apache/write.t>, we can see
that it starts with the warning that it has been autogenerated, so you
---------------------------------------------------------------------
To unsubscribe, e-mail: docs-cvs-unsubscribe@perl.apache.org
For additional commands, e-mail: docs-cvs-help@perl.apache.org