httpd-test-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stas Bekman <s...@stason.org>
Subject the utils package to make it easier to write tests
Date Tue, 11 Sep 2001 02:11:24 GMT
Recently we have added Apache::TestUtil which should make the test writing
shorter and simpler. You especially want to use if you create some files
and directories, since it'll take care of cleaning those up for you at the
end of the run. You can read the manpage by doing:

perldoc Apache-Test/lib/Apache/TestUtil.pm

I'll post here only the SYNOPSIS part to get you an idea. I've also ported
partially vhost_alias.t and alias.t to use this package.

If you need any other general use utilities that are missing from this
package, please let us know.

NAME
       Apache::TestUtil - Utility functions for writing tests

SYNOPSIS
         use Apache::Test;
         use Apache::TestUtil;

         ok t_cmp("foo", "foo", "sanity check");
         t_write_file("filename", @content);
         my $fh = t_open_file($filename);
         t_mkdir("/foo/bar");
         t_rmtree("/foo/bar");

... the rest of the code get via:
perldoc Apache-Test/lib/Apache/TestUtil.pm


_____________________________________________________________________
Stas Bekman              JAm_pH     --   Just Another mod_perl Hacker
http://stason.org/       mod_perl Guide  http://perl.apache.org/guide
mailto:stas@stason.org   http://apachetoday.com http://eXtropia.com/
http://singlesheaven.com http://perl.apache.org http://perlmonth.com/



Mime
View raw message