.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.40) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "Wiki::Toolkit::TestLib 3pm" .TH Wiki::Toolkit::TestLib 3pm "2021-01-04" "perl v5.32.0" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" Wiki::Toolkit::TestLib \- Utilities for writing Wiki::Toolkit tests. .SH "DESCRIPTION" .IX Header "DESCRIPTION" When 'perl Makefile.PL' is run on a Wiki::Toolkit distribution, information will be gathered about test databases etc that can be used for running tests. Wiki::Toolkit::TestLib gives convenient access to this information. .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 3 \& use strict; \& use Wiki::Toolkit::TestLib; \& use Test::More; \& \& my $iterator = Wiki::Toolkit::TestLib\->new_wiki_maker; \& plan tests => ( $iterator\->number * 6 ); \& \& while ( my $wiki = $iterator\->new_wiki ) { \& # put some test data in \& # run six tests \& } .Ve .PP Each time you call \f(CW\*(C`\->next\*(C'\fR on your iterator, you will get a fresh blank wiki object. The iterator will iterate over all configured search and storage backends. .PP The Lucy search backend will be configured to index three metadata fields: address, category, and locale. .SH "METHODS" .IX Header "METHODS" .IP "\fBnew_wiki_maker\fR" 4 .IX Item "new_wiki_maker" .Vb 1 \& my $iterator = Wiki::Toolkit::TestLib\->new_wiki_maker; .Ve .IP "\fBnumber\fR" 4 .IX Item "number" .Vb 3 \& use Test::More; \& my $iterator = Wiki::Toolkit::TestLib\->new_wiki_maker; \& plan tests => ( $iterator\->number * 6 ); .Ve .Sp Returns the number of new wikis that your iterator will be able to give you. .IP "\fBnew_wiki\fR" 4 .IX Item "new_wiki" .Vb 1 \& my $wiki = $iterator\->new_wiki; .Ve .Sp Returns a fresh blank wiki object, or false if you've used up all the configured search and storage backends. .IP "\fBconfigured_databases\fR" 4 .IX Item "configured_databases" .Vb 1 \& my @configured_databases = $iterator\->configured_databases; \& \& Returns the @configured_databases array detailing configured test databases. \& Useful for very low\-level testing only. .Ve .SH "SEE ALSO" .IX Header "SEE ALSO" Wiki::Toolkit .SH "AUTHOR" .IX Header "AUTHOR" Kake Pugh (kake@earth.li). .SH "COPYRIGHT" .IX Header "COPYRIGHT" .Vb 2 \& Copyright (C) 2003\-2004 Kake Pugh. All Rights Reserved. \& Copyright (C) 2008 the Wiki::Toolkit team. All Rights Reserved. .Ve .PP This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. .SH "CAVEATS" .IX Header "CAVEATS" If you have the Search::InvertedIndex backend configured (see Wiki::Toolkit::Search::SII) then your tests will raise warnings like .PP .Vb 3 \& (in cleanup) Search::InvertedIndex::DB::Mysql::lock() \- \& testdb is not open. Can\*(Aqt lock. \& at /usr/local/share/perl/5.6.1/Search/InvertedIndex.pm line 1348 .Ve .PP or .PP .Vb 3 \& (in cleanup) Can\*(Aqt call method "sync" on an undefined value \& at /usr/local/share/perl/5.6.1/Tie/DB_File/SplitHash.pm line 331 \& during global destruction. .Ve .PP in unexpected places. I don't know whether this is a bug in me or in Search::InvertedIndex.