stas 2003/04/21 17:30:18
Modified: perl-framework/Apache-Test/lib/Apache TestUtil.pm
perl-framework/Apache-Test Changes
Log:
Apache::TestUtil API change:
write_perl_script => t_write_perl_script
write_shell_script => t_write_shell_script
chown => t_chown
All 3 functions are now optionally exported
Submitted by: Geoffrey Young
Revision Changes Path
1.30 +12 -10
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.29
retrieving revision 1.30
diff -u -r1.29 -r1.30
--- TestUtil.pm 1 Apr 2003 04:12:55 -0000 1.29
+++ TestUtil.pm 22 Apr 2003 00:30:18 -0000 1.30
@@ -15,7 +15,7 @@
use Apache::Test ();
use Apache::TestConfig ();
-use vars qw($VERSION @ISA @EXPORT %CLEAN);
+use vars qw($VERSION @ISA @EXPORT @EXPORT_OK %CLEAN);
$VERSION = '0.01';
@ISA = qw(Exporter);
@@ -26,6 +26,8 @@
t_client_log_error_is_expected t_client_log_warn_is_expected
);
[EMAIL PROTECTED] = qw(t_write_perl_script t_write_shell_script t_chown);
+
%CLEAN = ();
use constant HAS_DUMPER => eval { require Data::Dumper; };
@@ -99,7 +101,7 @@
close $fh;
}
-sub write_shell_script {
+sub t_write_shell_script {
my $file = shift;
my $code = join '', @_;
@@ -120,7 +122,7 @@
$ext;
}
-sub write_perl_script {
+sub t_write_perl_script {
my $file = shift;
my $shebang = "#!$Config{perlpath}\n";
@@ -160,7 +162,7 @@
#chown a file or directory to the test User/Group
#noop if chown is unsupported
-sub chown {
+sub t_chown {
my $file = shift;
my $config = Apache::Test::config();
my($uid, $gid);
@@ -433,9 +435,9 @@
This function is exported by default.
-=item write_shell_script()
+=item t_write_shell_script()
- write_shell_script($filename, @lines);
+ Apache::TestUtil::t_write_shell_script($filename, @lines);
Similar to t_write_file() but creates a portable shell/batch
script. The created filename is constructed from C<$filename> and an
@@ -444,9 +446,9 @@
It returns the extension of the created file.
-=item write_perl_script()
+=item t_write_perl_script()
- write_perl_script($filename, @lines);
+ Apache::TestUtil::t_write_perl_script($filename, @lines);
Similar to t_write_file() but creates a executable Perl script with
correctly set shebang line.
@@ -489,9 +491,9 @@
This function is exported by default.
-=item chown()
+=item t_chown()
- Apache::TestUtil::chown($file);
+ Apache::TestUtil::t_chown($file);
Change ownership of $file to the test's I<User>/I<Group>. This
function is noop on platforms where chown(2) is unsupported
1.2 +6 -0 httpd-test/perl-framework/Apache-Test/Changes
Index: Changes
===================================================================
RCS file: /home/cvs/httpd-test/perl-framework/Apache-Test/Changes,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- Changes 22 Apr 2003 00:28:58 -0000 1.1
+++ Changes 22 Apr 2003 00:30:18 -0000 1.2
@@ -8,6 +8,12 @@
=item 1.00
+Apache::TestUtil API change:
+write_perl_script => t_write_perl_script
+write_shell_script => t_write_shell_script
+chown => t_chown
+All 3 functions are now optionally exported [Geoffrey Young].
+
Provide a new request macro _BODY_ASSERT to replace _BODY in cases
where the client part of the test directly prints to the output, in
order to avoid skipped tests instead of reporting the failure of the