Linux server.nvwebsoft.co.in 3.10.0-1160.114.2.el7.x86_64 #1 SMP Wed Mar 20 15:54:52 UTC 2024 x86_64
Apache
: 162.240.12.249 | : 18.189.192.214
202 Domain
8.1.31
nbspublicschool
www.github.com/MadExploits
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
CPANEL RESET
CREATE WP USER
README
+ Create Folder
+ Create File
/
usr /
local /
share /
man /
man3 /
[ HOME SHELL ]
Name
Size
Permission
Action
App::cpanminus.3pm
14.28
KB
-r--r--r--
App::cpanminus::fatscript.3pm
26.28
KB
-r--r--r--
Bundle::DBD::mysql.3pm
4.09
KB
-r--r--r--
CPAN::Meta::Requirements.3pm
13.78
KB
-r--r--r--
CPAN::Meta::YAML.3pm
5.89
KB
-r--r--r--
Canary::Stability.3pm
5.84
KB
-r--r--r--
DBD::mysql.3pm
48.68
KB
-r--r--r--
DBD::mysql::INSTALL.3pm
30.13
KB
-r--r--r--
Data::Dump.3pm
10.51
KB
-r--r--r--
Data::Dump::Filtered.3pm
10.39
KB
-r--r--r--
Data::Dump::Trace.3pm
9
KB
-r--r--r--
Data::Validate::IP.3pm
15.68
KB
-r--r--r--
Devel::CheckLib.3pm
11.45
KB
-r--r--r--
Digest::MD5.3pm
16.16
KB
-r--r--r--
Error.3pm
21.39
KB
-r--r--r--
Error::Simple.3pm
8.15
KB
-r--r--r--
Expect.3pm
60.58
KB
-r--r--r--
Exporter.3pm
22.74
KB
-r--r--r--
Exporter::Heavy.3pm
4.1
KB
-r--r--r--
File::Copy::Recursive.3pm
18.63
KB
-r--r--r--
File::LckPwdF.3pm
11.21
KB
-r--r--r--
File::Path.3pm
32.74
KB
-r--r--r--
File::ReadBackwards.3pm
10.38
KB
-r--r--r--
File::Temp.3pm
39.49
KB
-r--r--r--
HTML::TagParser.3pm
14.01
KB
-r--r--r--
HTTP::Date.3pm
9.36
KB
-r--r--r--
HTTP::Tiny.3pm
29.24
KB
-r--r--r--
IO::AtomicFile.3pm
7.02
KB
-r--r--r--
IO::InnerFile.3pm
7.66
KB
-r--r--r--
IO::Lines.3pm
5.46
KB
-r--r--r--
IO::Pty.3pm
10.14
KB
-r--r--r--
IO::Scalar.3pm
12.19
KB
-r--r--r--
IO::ScalarArray.3pm
12.04
KB
-r--r--r--
IO::Stringy.3pm
5.72
KB
-r--r--r--
IO::Tty.3pm
9.91
KB
-r--r--r--
IO::Tty::Constant.3pm
11.25
KB
-r--r--r--
IO::Wrap.3pm
12.18
KB
-r--r--r--
IO::WrapTie.3pm
16.4
KB
-r--r--r--
JSON.3pm
64.46
KB
-r--r--r--
JSON::Syck.3pm
9.67
KB
-r--r--r--
JSON::XS.3pm
88.67
KB
-r--r--r--
JSON::XS::Boolean.3pm
4.55
KB
-r--r--r--
JSON::backportPP.3pm
65.09
KB
-r--r--r--
JSON::backportPP::Boolean.3pm
4.52
KB
-r--r--r--
JSON::backportPP::Compat5005.3...
4.39
KB
-r--r--r--
JSON::backportPP::Compat5006.3...
4.39
KB
-r--r--r--
Mail::RFC822::Address.3pm
7.11
KB
-r--r--r--
Mock::Config.3pm
7.73
KB
-r--r--r--
Module::Load.3pm
11.18
KB
-r--r--r--
Module::Load::Conditional.3pm
14.24
KB
-r--r--r--
NetAddr::IP.3pm
38.15
KB
-r--r--r--
NetAddr::IP::InetBase.3pm
14.65
KB
-r--r--r--
NetAddr::IP::Lite.3pm
26.89
KB
-r--r--r--
NetAddr::IP::Util.3pm
23.49
KB
-r--r--r--
NetAddr::IP::UtilPP.3pm
11.04
KB
-r--r--r--
POD2::DE::local::lib.3pm
24.23
KB
-r--r--r--
POD2::PT_BR::local::lib.3pm
24.62
KB
-r--r--r--
Path::Tiny.3pm
52.88
KB
-r--r--r--
Storable.3pm
45.41
KB
-r--r--r--
Template::Toolkit::Simple.3pm
13.37
KB
-r--r--r--
Test2.3pm
11.13
KB
-r--r--r--
Test2::API.3pm
37.22
KB
-r--r--r--
Test2::API::Breakage.3pm
6.63
KB
-r--r--r--
Test2::API::Context.3pm
25.52
KB
-r--r--r--
Test2::API::Instance.3pm
14.72
KB
-r--r--r--
Test2::API::InterceptResult.3p...
22
KB
-r--r--r--
Test2::API::InterceptResult::E...
26.72
KB
-r--r--r--
Test2::API::InterceptResult::H...
4.64
KB
-r--r--r--
Test2::API::InterceptResult::S...
4.77
KB
-r--r--r--
Test2::API::Stack.3pm
8.18
KB
-r--r--r--
Test2::Event.3pm
22.81
KB
-r--r--r--
Test2::Event::Bail.3pm
5.15
KB
-r--r--r--
Test2::Event::Diag.3pm
5.02
KB
-r--r--r--
Test2::Event::Encoding.3pm
5.36
KB
-r--r--r--
Test2::Event::Exception.3pm
5.3
KB
-r--r--r--
Test2::Event::Fail.3pm
4.93
KB
-r--r--r--
Test2::Event::Generic.3pm
9.66
KB
-r--r--r--
Test2::Event::Note.3pm
5.01
KB
-r--r--r--
Test2::Event::Ok.3pm
5.69
KB
-r--r--r--
Test2::Event::Pass.3pm
4.93
KB
-r--r--r--
Test2::Event::Plan.3pm
5.58
KB
-r--r--r--
Test2::Event::Skip.3pm
5.34
KB
-r--r--r--
Test2::Event::Subtest.3pm
5.25
KB
-r--r--r--
Test2::Event::TAP::Version.3pm
5.18
KB
-r--r--r--
Test2::Event::V2.3pm
8.26
KB
-r--r--r--
Test2::Event::Waiting.3pm
4.8
KB
-r--r--r--
Test2::EventFacet.3pm
5.57
KB
-r--r--r--
Test2::EventFacet::About.3pm
6.37
KB
-r--r--r--
Test2::EventFacet::Amnesty.3pm
6.16
KB
-r--r--r--
Test2::EventFacet::Assert.3pm
6.41
KB
-r--r--r--
Test2::EventFacet::Control.3pm
7.4
KB
-r--r--r--
Test2::EventFacet::Error.3pm
6.26
KB
-r--r--r--
Test2::EventFacet::Hub.3pm
7.12
KB
-r--r--r--
Test2::EventFacet::Info.3pm
8.17
KB
-r--r--r--
Test2::EventFacet::Info::Table...
7.16
KB
-r--r--r--
Test2::EventFacet::Meta.3pm
5.22
KB
-r--r--r--
Test2::EventFacet::Parent.3pm
6.31
KB
-r--r--r--
Test2::EventFacet::Plan.3pm
6.67
KB
-r--r--r--
Test2::EventFacet::Render.3pm
6.84
KB
-r--r--r--
Test2::EventFacet::Trace.3pm
12.58
KB
-r--r--r--
Test2::Formatter.3pm
7.9
KB
-r--r--r--
Test2::Formatter::TAP.3pm
6.38
KB
-r--r--r--
Test2::Hub.3pm
18.36
KB
-r--r--r--
Test2::Hub::Interceptor.3pm
4.63
KB
-r--r--r--
Test2::Hub::Interceptor::Termi...
4.67
KB
-r--r--r--
Test2::Hub::Subtest.3pm
5.48
KB
-r--r--r--
Test2::IPC.3pm
5.18
KB
-r--r--r--
Test2::IPC::Driver.3pm
10.51
KB
-r--r--r--
Test2::IPC::Driver::Files.3pm
5.49
KB
-r--r--r--
Test2::Tools::Tiny.3pm
8.45
KB
-r--r--r--
Test2::Transition.3pm
19.71
KB
-r--r--r--
Test2::Util.3pm
9.42
KB
-r--r--r--
Test2::Util::ExternalMeta.3pm
7.22
KB
-r--r--r--
Test2::Util::Facets2Legacy.3pm
9.88
KB
-r--r--r--
Test2::Util::HashBase.3pm
13.91
KB
-r--r--r--
Test2::Util::Trace.3pm
4.74
KB
-r--r--r--
Test::Builder.3pm
28.79
KB
-r--r--r--
Test::Builder::Formatter.3pm
4.85
KB
-r--r--r--
Test::Builder::IO::Scalar.3pm
11.27
KB
-r--r--r--
Test::Builder::Module.3pm
7.35
KB
-r--r--r--
Test::Builder::Tester.3pm
13.04
KB
-r--r--r--
Test::Builder::Tester::Color.3...
4.82
KB
-r--r--r--
Test::Builder::TodoDiag.3pm
4.82
KB
-r--r--r--
Test::Deep.3pm
47.56
KB
-r--r--r--
Test::Deep::NoTest.3pm
4.33
KB
-r--r--r--
Test::Fatal.3pm
10.69
KB
-r--r--r--
Test::File.3pm
23.7
KB
-r--r--r--
Test::More.3pm
43.96
KB
-r--r--r--
Test::Needs.3pm
7.27
KB
-r--r--r--
Test::Requires.3pm
5.93
KB
-r--r--r--
Test::Simple.3pm
10.67
KB
-r--r--r--
Test::Tester.3pm
17.76
KB
-r--r--r--
Test::Tester::Capture.3pm
4.59
KB
-r--r--r--
Test::Tester::CaptureRunner.3p...
4.37
KB
-r--r--r--
Test::Tutorial.3pm
25.46
KB
-r--r--r--
Test::Warnings.3pm
15.7
KB
-r--r--r--
Test::use::ok.3pm
5.52
KB
-r--r--r--
Text::Aligner.3pm
9.77
KB
-r--r--r--
Text::Table.3pm
27.18
KB
-r--r--r--
Time::Local.3pm
15.63
KB
-r--r--r--
Try::Tiny.3pm
22.09
KB
-r--r--r--
URI.3pm
40.31
KB
-r--r--r--
URI::Escape.3pm
9.58
KB
-r--r--r--
URI::Heuristic.3pm
6.84
KB
-r--r--r--
URI::QueryParam.3pm
8.26
KB
-r--r--r--
URI::Split.3pm
5.73
KB
-r--r--r--
URI::URL.3pm
6.19
KB
-r--r--r--
URI::WithBase.3pm
5.91
KB
-r--r--r--
URI::_punycode.3pm
6.32
KB
-r--r--r--
URI::data.3pm
5.98
KB
-r--r--r--
URI::file.3pm
12.16
KB
-r--r--r--
URI::ldap.3pm
7.36
KB
-r--r--r--
YAML::LibYAML.3pm
4.51
KB
-r--r--r--
YAML::Syck.3pm
12.34
KB
-r--r--r--
YAML::XS.3pm
9.57
KB
-r--r--r--
YAML::XS::LibYAML.3pm
3.99
KB
-r--r--r--
lib::core::only.3pm
7.28
KB
-r--r--r--
local::lib.3pm
32.78
KB
-r--r--r--
ok.3pm
4.55
KB
-r--r--r--
version.3pm
15.37
KB
-r--r--r--
version::Internals.3pm
31.34
KB
-r--r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : Test::Builder.3pm
.\" Automatically generated by Pod::Man 2.27 (Pod::Simple 3.28) .\" .\" 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 turned on, 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 .\" .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). .\" Fear. Run. Save yourself. No user-serviceable parts. . \" fudge factors for nroff and troff .if n \{\ . ds #H 0 . ds #V .8m . ds #F .3m . ds #[ \f1 . ds #] \fP .\} .if t \{\ . ds #H ((1u-(\\\\n(.fu%2u))*.13m) . ds #V .6m . ds #F 0 . ds #[ \& . ds #] \& .\} . \" simple accents for nroff and troff .if n \{\ . ds ' \& . ds ` \& . ds ^ \& . ds , \& . ds ~ ~ . ds / .\} .if t \{\ . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' .\} . \" troff and (daisy-wheel) nroff accents .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' .ds 8 \h'\*(#H'\(*b\h'-\*(#H' .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] .ds ae a\h'-(\w'a'u*4/10)'e .ds Ae A\h'-(\w'A'u*4/10)'E . \" corrections for vroff .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' . \" for low resolution devices (crt and lpr) .if \n(.H>23 .if \n(.V>19 \ \{\ . ds : e . ds 8 ss . ds o a . ds d- d\h'-1'\(ga . ds D- D\h'-1'\(hy . ds th \o'bp' . ds Th \o'LP' . ds ae ae . ds Ae AE .\} .rm #[ #] #H #V #F C .\" ======================================================================== .\" .IX Title "Test::Builder 3" .TH Test::Builder 3 "2022-03-04" "perl v5.16.3" "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" Test::Builder \- Backend for building test libraries .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 2 \& package My::Test::Module; \& use base \*(AqTest::Builder::Module\*(Aq; \& \& my $CLASS = _\|_PACKAGE_\|_; \& \& sub ok { \& my($test, $name) = @_; \& my $tb = $CLASS\->builder; \& \& $tb\->ok($test, $name); \& } .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" Test::Simple and Test::More have proven to be popular testing modules, but they're not always flexible enough. Test::Builder provides a building block upon which to write your own test libraries \fIwhich can work together\fR. .SS "Construction" .IX Subsection "Construction" .IP "\fBnew\fR" 4 .IX Item "new" .Vb 1 \& my $Test = Test::Builder\->new; .Ve .Sp Returns a Test::Builder object representing the current state of the test. .Sp Since you only run one test per program \f(CW\*(C`new\*(C'\fR always returns the same Test::Builder object. No matter how many times you call \f(CW\*(C`new()\*(C'\fR, you're getting the same object. This is called a singleton. This is done so that multiple modules share such global information as the test counter and where test output is going. .Sp If you want a completely new Test::Builder object different from the singleton, use \f(CW\*(C`create\*(C'\fR. .IP "\fBcreate\fR" 4 .IX Item "create" .Vb 1 \& my $Test = Test::Builder\->create; .Ve .Sp Ok, so there can be more than one Test::Builder object and this is how you get it. You might use this instead of \f(CW\*(C`new()\*(C'\fR if you're testing a Test::Builder based module, but otherwise you probably want \f(CW\*(C`new\*(C'\fR. .Sp \&\fB\s-1NOTE\s0\fR: the implementation is not complete. \f(CW\*(C`level\*(C'\fR, for example, is still shared by \fBall\fR Test::Builder objects, even ones created using this method. Also, the method name may change in the future. .IP "\fBsubtest\fR" 4 .IX Item "subtest" .Vb 1 \& $builder\->subtest($name, \e&subtests, @args); .Ve .Sp See documentation of \f(CW\*(C`subtest\*(C'\fR in Test::More. .Sp \&\f(CW\*(C`subtest\*(C'\fR also, and optionally, accepts arguments which will be passed to the subtests reference. .IP "\fBname\fR" 4 .IX Item "name" .Vb 1 \& diag $builder\->name; .Ve .Sp Returns the name of the current builder. Top level builders default to \f(CW$0\fR (the name of the executable). Child builders are named via the \f(CW\*(C`child\*(C'\fR method. If no name is supplied, will be named \*(L"Child of \f(CW$parent\fR\->name\*(R". .IP "\fBreset\fR" 4 .IX Item "reset" .Vb 1 \& $Test\->reset; .Ve .Sp Reinitializes the Test::Builder singleton to its original state. Mostly useful for tests run in persistent environments where the same test might be run multiple times in the same process. .SS "Setting up tests" .IX Subsection "Setting up tests" These methods are for setting up tests and declaring how many there are. You usually only want to call one of these methods. .IP "\fBplan\fR" 4 .IX Item "plan" .Vb 3 \& $Test\->plan(\*(Aqno_plan\*(Aq); \& $Test\->plan( skip_all => $reason ); \& $Test\->plan( tests => $num_tests ); .Ve .Sp A convenient way to set up your tests. Call this and Test::Builder will print the appropriate headers and take the appropriate actions. .Sp If you call \f(CW\*(C`plan()\*(C'\fR, don't call any of the other methods below. .IP "\fBexpected_tests\fR" 4 .IX Item "expected_tests" .Vb 2 \& my $max = $Test\->expected_tests; \& $Test\->expected_tests($max); .Ve .Sp Gets/sets the number of tests we expect this test to run and prints out the appropriate headers. .IP "\fBno_plan\fR" 4 .IX Item "no_plan" .Vb 1 \& $Test\->no_plan; .Ve .Sp Declares that this test will run an indeterminate number of tests. .IP "\fBdone_testing\fR" 4 .IX Item "done_testing" .Vb 2 \& $Test\->done_testing(); \& $Test\->done_testing($num_tests); .Ve .Sp Declares that you are done testing, no more tests will be run after this point. .Sp If a plan has not yet been output, it will do so. .Sp \&\f(CW$num_tests\fR is the number of tests you planned to run. If a numbered plan was already declared, and if this contradicts, a failing test will be run to reflect the planning mistake. If \f(CW\*(C`no_plan\*(C'\fR was declared, this will override. .Sp If \f(CW\*(C`done_testing()\*(C'\fR is called twice, the second call will issue a failing test. .Sp If \f(CW$num_tests\fR is omitted, the number of tests run will be used, like no_plan. .Sp \&\f(CW\*(C`done_testing()\*(C'\fR is, in effect, used when you'd want to use \f(CW\*(C`no_plan\*(C'\fR, but safer. You'd use it like so: .Sp .Vb 2 \& $Test\->ok($a == $b); \& $Test\->done_testing(); .Ve .Sp Or to plan a variable number of tests: .Sp .Vb 4 \& for my $test (@tests) { \& $Test\->ok($test); \& } \& $Test\->done_testing(scalar @tests); .Ve .IP "\fBhas_plan\fR" 4 .IX Item "has_plan" .Vb 1 \& $plan = $Test\->has_plan .Ve .Sp Find out whether a plan has been defined. \f(CW$plan\fR is either \f(CW\*(C`undef\*(C'\fR (no plan has been set), \f(CW\*(C`no_plan\*(C'\fR (indeterminate # of tests) or an integer (the number of expected tests). .IP "\fBskip_all\fR" 4 .IX Item "skip_all" .Vb 2 \& $Test\->skip_all; \& $Test\->skip_all($reason); .Ve .Sp Skips all the tests, using the given \f(CW$reason\fR. Exits immediately with 0. .IP "\fBexported_to\fR" 4 .IX Item "exported_to" .Vb 2 \& my $pack = $Test\->exported_to; \& $Test\->exported_to($pack); .Ve .Sp Tells Test::Builder what package you exported your functions to. .Sp This method isn't terribly useful since modules which share the same Test::Builder object might get exported to different packages and only the last one will be honored. .SS "Running tests" .IX Subsection "Running tests" These actually run the tests, analogous to the functions in Test::More. .PP They all return true if the test passed, false if the test failed. .PP \&\f(CW$name\fR is always optional. .IP "\fBok\fR" 4 .IX Item "ok" .Vb 1 \& $Test\->ok($test, $name); .Ve .Sp Your basic test. Pass if \f(CW$test\fR is true, fail if \f(CW$test\fR is false. Just like Test::Simple's \f(CW\*(C`ok()\*(C'\fR. .IP "\fBis_eq\fR" 4 .IX Item "is_eq" .Vb 1 \& $Test\->is_eq($got, $expected, $name); .Ve .Sp Like Test::More's \f(CW\*(C`is()\*(C'\fR. Checks if \f(CW\*(C`$got eq $expected\*(C'\fR. This is the string version. .Sp \&\f(CW\*(C`undef\*(C'\fR only ever matches another \f(CW\*(C`undef\*(C'\fR. .IP "\fBis_num\fR" 4 .IX Item "is_num" .Vb 1 \& $Test\->is_num($got, $expected, $name); .Ve .Sp Like Test::More's \f(CW\*(C`is()\*(C'\fR. Checks if \f(CW\*(C`$got == $expected\*(C'\fR. This is the numeric version. .Sp \&\f(CW\*(C`undef\*(C'\fR only ever matches another \f(CW\*(C`undef\*(C'\fR. .IP "\fBisnt_eq\fR" 4 .IX Item "isnt_eq" .Vb 1 \& $Test\->isnt_eq($got, $dont_expect, $name); .Ve .Sp Like Test::More's \f(CW\*(C`isnt()\*(C'\fR. Checks if \f(CW\*(C`$got ne $dont_expect\*(C'\fR. This is the string version. .IP "\fBisnt_num\fR" 4 .IX Item "isnt_num" .Vb 1 \& $Test\->isnt_num($got, $dont_expect, $name); .Ve .Sp Like Test::More's \f(CW\*(C`isnt()\*(C'\fR. Checks if \f(CW\*(C`$got ne $dont_expect\*(C'\fR. This is the numeric version. .IP "\fBlike\fR" 4 .IX Item "like" .Vb 2 \& $Test\->like($thing, qr/$regex/, $name); \& $Test\->like($thing, \*(Aq/$regex/\*(Aq, $name); .Ve .Sp Like Test::More's \f(CW\*(C`like()\*(C'\fR. Checks if \f(CW$thing\fR matches the given \f(CW$regex\fR. .IP "\fBunlike\fR" 4 .IX Item "unlike" .Vb 2 \& $Test\->unlike($thing, qr/$regex/, $name); \& $Test\->unlike($thing, \*(Aq/$regex/\*(Aq, $name); .Ve .Sp Like Test::More's \f(CW\*(C`unlike()\*(C'\fR. Checks if \f(CW$thing\fR \fBdoes not match\fR the given \f(CW$regex\fR. .IP "\fBcmp_ok\fR" 4 .IX Item "cmp_ok" .Vb 1 \& $Test\->cmp_ok($thing, $type, $that, $name); .Ve .Sp Works just like Test::More's \f(CW\*(C`cmp_ok()\*(C'\fR. .Sp .Vb 1 \& $Test\->cmp_ok($big_num, \*(Aq!=\*(Aq, $other_big_num); .Ve .SS "Other Testing Methods" .IX Subsection "Other Testing Methods" These are methods which are used in the course of writing a test but are not themselves tests. .IP "\fB\s-1BAIL_OUT\s0\fR" 4 .IX Item "BAIL_OUT" .Vb 1 \& $Test\->BAIL_OUT($reason); .Ve .Sp Indicates to the Test::Harness that things are going so badly all testing should terminate. This includes running any additional test scripts. .Sp It will exit with 255. .IP "\fBskip\fR" 4 .IX Item "skip" .Vb 2 \& $Test\->skip; \& $Test\->skip($why); .Ve .Sp Skips the current test, reporting \f(CW$why\fR. .IP "\fBtodo_skip\fR" 4 .IX Item "todo_skip" .Vb 2 \& $Test\->todo_skip; \& $Test\->todo_skip($why); .Ve .Sp Like \f(CW\*(C`skip()\*(C'\fR, only it will declare the test as failing and \s-1TODO. \s0 Similar to .Sp .Vb 1 \& print "not ok $tnum # TODO $why\en"; .Ve .SS "Test building utility methods" .IX Subsection "Test building utility methods" These methods are useful when writing your own test methods. .IP "\fBmaybe_regex\fR" 4 .IX Item "maybe_regex" .Vb 2 \& $Test\->maybe_regex(qr/$regex/); \& $Test\->maybe_regex(\*(Aq/$regex/\*(Aq); .Ve .Sp This method used to be useful back when Test::Builder worked on Perls before 5.6 which didn't have qr//. Now its pretty useless. .Sp Convenience method for building testing functions that take regular expressions as arguments. .Sp Takes a quoted regular expression produced by \f(CW\*(C`qr//\*(C'\fR, or a string representing a regular expression. .Sp Returns a Perl value which may be used instead of the corresponding regular expression, or \f(CW\*(C`undef\*(C'\fR if its argument is not recognized. .Sp For example, a version of \f(CW\*(C`like()\*(C'\fR, sans the useful diagnostic messages, could be written as: .Sp .Vb 7 \& sub laconic_like { \& my ($self, $thing, $regex, $name) = @_; \& my $usable_regex = $self\->maybe_regex($regex); \& die "expecting regex, found \*(Aq$regex\*(Aq\en" \& unless $usable_regex; \& $self\->ok($thing =~ m/$usable_regex/, $name); \& } .Ve .IP "\fBis_fh\fR" 4 .IX Item "is_fh" .Vb 1 \& my $is_fh = $Test\->is_fh($thing); .Ve .Sp Determines if the given \f(CW$thing\fR can be used as a filehandle. .SS "Test style" .IX Subsection "Test style" .IP "\fBlevel\fR" 4 .IX Item "level" .Vb 1 \& $Test\->level($how_high); .Ve .Sp How far up the call stack should \f(CW$Test\fR look when reporting where the test failed. .Sp Defaults to 1. .Sp Setting \f(CW$Test::Builder::Level\fR overrides. This is typically useful localized: .Sp .Vb 2 \& sub my_ok { \& my $test = shift; \& \& local $Test::Builder::Level = $Test::Builder::Level + 1; \& $TB\->ok($test); \& } .Ve .Sp To be polite to other functions wrapping your own you usually want to increment \f(CW$Level\fR rather than set it to a constant. .IP "\fBuse_numbers\fR" 4 .IX Item "use_numbers" .Vb 1 \& $Test\->use_numbers($on_or_off); .Ve .Sp Whether or not the test should output numbers. That is, this if true: .Sp .Vb 3 \& ok 1 \& ok 2 \& ok 3 .Ve .Sp or this if false .Sp .Vb 3 \& ok \& ok \& ok .Ve .Sp Most useful when you can't depend on the test output order, such as when threads or forking is involved. .Sp Defaults to on. .IP "\fBno_diag\fR" 4 .IX Item "no_diag" .Vb 1 \& $Test\->no_diag($no_diag); .Ve .Sp If set true no diagnostics will be printed. This includes calls to \&\f(CW\*(C`diag()\*(C'\fR. .IP "\fBno_ending\fR" 4 .IX Item "no_ending" .Vb 1 \& $Test\->no_ending($no_ending); .Ve .Sp Normally, Test::Builder does some extra diagnostics when the test ends. It also changes the exit code as described below. .Sp If this is true, none of that will be done. .IP "\fBno_header\fR" 4 .IX Item "no_header" .Vb 1 \& $Test\->no_header($no_header); .Ve .Sp If set to true, no \*(L"1..N\*(R" header will be printed. .SS "Output" .IX Subsection "Output" Controlling where the test output goes. .PP It's ok for your test to change where \s-1STDOUT\s0 and \s-1STDERR\s0 point to, Test::Builder's default output settings will not be affected. .IP "\fBdiag\fR" 4 .IX Item "diag" .Vb 1 \& $Test\->diag(@msgs); .Ve .Sp Prints out the given \f(CW@msgs\fR. Like \f(CW\*(C`print\*(C'\fR, arguments are simply appended together. .Sp Normally, it uses the \f(CW\*(C`failure_output()\*(C'\fR handle, but if this is for a \&\s-1TODO\s0 test, the \f(CW\*(C`todo_output()\*(C'\fR handle is used. .Sp Output will be indented and marked with a # so as not to interfere with test output. A newline will be put on the end if there isn't one already. .Sp We encourage using this rather than calling print directly. .Sp Returns false. Why? Because \f(CW\*(C`diag()\*(C'\fR is often used in conjunction with a failing test (\f(CW\*(C`ok() || diag()\*(C'\fR) it \*(L"passes through\*(R" the failure. .Sp .Vb 1 \& return ok(...) || diag(...); .Ve .IP "\fBnote\fR" 4 .IX Item "note" .Vb 1 \& $Test\->note(@msgs); .Ve .Sp Like \f(CW\*(C`diag()\*(C'\fR, but it prints to the \f(CW\*(C`output()\*(C'\fR handle so it will not normally be seen by the user except in verbose mode. .IP "\fBexplain\fR" 4 .IX Item "explain" .Vb 1 \& my @dump = $Test\->explain(@msgs); .Ve .Sp Will dump the contents of any references in a human readable format. Handy for things like... .Sp .Vb 1 \& is_deeply($have, $want) || diag explain $have; .Ve .Sp or .Sp .Vb 1 \& is_deeply($have, $want) || note explain $have; .Ve .IP "\fBoutput\fR" 4 .IX Item "output" .PD 0 .IP "\fBfailure_output\fR" 4 .IX Item "failure_output" .IP "\fBtodo_output\fR" 4 .IX Item "todo_output" .PD .Vb 4 \& my $filehandle = $Test\->output; \& $Test\->output($filehandle); \& $Test\->output($filename); \& $Test\->output(\e$scalar); .Ve .Sp These methods control where Test::Builder will print its output. They take either an open \f(CW$filehandle\fR, a \f(CW$filename\fR to open and write to or a \f(CW$scalar\fR reference to append to. It will always return a \f(CW$filehandle\fR. .Sp \&\fBoutput\fR is where normal \*(L"ok/not ok\*(R" test output goes. .Sp Defaults to \s-1STDOUT.\s0 .Sp \&\fBfailure_output\fR is where diagnostic output on test failures and \&\f(CW\*(C`diag()\*(C'\fR goes. It is normally not read by Test::Harness and instead is displayed to the user. .Sp Defaults to \s-1STDERR.\s0 .Sp \&\f(CW\*(C`todo_output\*(C'\fR is used instead of \f(CW\*(C`failure_output()\*(C'\fR for the diagnostics of a failing \s-1TODO\s0 test. These will not be seen by the user. .Sp Defaults to \s-1STDOUT.\s0 .IP "reset_outputs" 4 .IX Item "reset_outputs" .Vb 1 \& $tb\->reset_outputs; .Ve .Sp Resets all the output filehandles back to their defaults. .IP "carp" 4 .IX Item "carp" .Vb 1 \& $tb\->carp(@message); .Ve .Sp Warns with \f(CW@message\fR but the message will appear to come from the point where the original test function was called (\f(CW\*(C`$tb\->caller\*(C'\fR). .IP "croak" 4 .IX Item "croak" .Vb 1 \& $tb\->croak(@message); .Ve .Sp Dies with \f(CW@message\fR but the message will appear to come from the point where the original test function was called (\f(CW\*(C`$tb\->caller\*(C'\fR). .SS "Test Status and Info" .IX Subsection "Test Status and Info" .IP "\fBno_log_results\fR" 4 .IX Item "no_log_results" This will turn off result long-term storage. Calling this method will make \&\f(CW\*(C`details\*(C'\fR and \f(CW\*(C`summary\*(C'\fR useless. You may want to use this if you are running enough tests to fill up all available memory. .Sp .Vb 1 \& Test::Builder\->new\->no_log_results(); .Ve .Sp There is no way to turn it back on. .IP "\fBcurrent_test\fR" 4 .IX Item "current_test" .Vb 2 \& my $curr_test = $Test\->current_test; \& $Test\->current_test($num); .Ve .Sp Gets/sets the current test number we're on. You usually shouldn't have to set this. .Sp If set forward, the details of the missing tests are filled in as 'unknown'. if set backward, the details of the intervening tests are deleted. You can erase history if you really want to. .IP "\fBis_passing\fR" 4 .IX Item "is_passing" .Vb 1 \& my $ok = $builder\->is_passing; .Ve .Sp Indicates if the test suite is currently passing. .Sp More formally, it will be false if anything has happened which makes it impossible for the test suite to pass. True otherwise. .Sp For example, if no tests have run \f(CW\*(C`is_passing()\*(C'\fR will be true because even though a suite with no tests is a failure you can add a passing test to it and start passing. .Sp Don't think about it too much. .IP "\fBsummary\fR" 4 .IX Item "summary" .Vb 1 \& my @tests = $Test\->summary; .Ve .Sp A simple summary of the tests so far. True for pass, false for fail. This is a logical pass/fail, so todos are passes. .Sp Of course, test #1 is \f(CW$tests\fR[0], etc... .IP "\fBdetails\fR" 4 .IX Item "details" .Vb 1 \& my @tests = $Test\->details; .Ve .Sp Like \f(CW\*(C`summary()\*(C'\fR, but with a lot more detail. .Sp .Vb 7 \& $tests[$test_num \- 1] = \& { \*(Aqok\*(Aq => is the test considered a pass? \& actual_ok => did it literally say \*(Aqok\*(Aq? \& name => name of the test (if any) \& type => type of test (if any, see below). \& reason => reason for the above (if any) \& }; .Ve .Sp \&'ok' is true if Test::Harness will consider the test to be a pass. .Sp \&'actual_ok' is a reflection of whether or not the test literally printed 'ok' or 'not ok'. This is for examining the result of 'todo' tests. .Sp \&'name' is the name of the test. .Sp \&'type' indicates if it was a special test. Normal tests have a type of ''. Type can be one of the following: .Sp .Vb 4 \& skip see skip() \& todo see todo() \& todo_skip see todo_skip() \& unknown see below .Ve .Sp Sometimes the Test::Builder test counter is incremented without it printing any test output, for example, when \f(CW\*(C`current_test()\*(C'\fR is changed. In these cases, Test::Builder doesn't know the result of the test, so its type is 'unknown'. These details for these tests are filled in. They are considered ok, but the name and actual_ok is left \f(CW\*(C`undef\*(C'\fR. .Sp For example \*(L"not ok 23 \- hole count # \s-1TODO\s0 insufficient donuts\*(R" would result in this structure: .Sp .Vb 7 \& $tests[22] = # 23 \- 1, since arrays start from 0. \& { ok => 1, # logically, the test passed since its todo \& actual_ok => 0, # in absolute terms, it failed \& name => \*(Aqhole count\*(Aq, \& type => \*(Aqtodo\*(Aq, \& reason => \*(Aqinsufficient donuts\*(Aq \& }; .Ve .IP "\fBtodo\fR" 4 .IX Item "todo" .Vb 2 \& my $todo_reason = $Test\->todo; \& my $todo_reason = $Test\->todo($pack); .Ve .Sp If the current tests are considered \*(L"\s-1TODO\*(R"\s0 it will return the reason, if any. This reason can come from a \f(CW$TODO\fR variable or the last call to \f(CW\*(C`todo_start()\*(C'\fR. .Sp Since a \s-1TODO\s0 test does not need a reason, this function can return an empty string even when inside a \s-1TODO\s0 block. Use \f(CW\*(C`$Test\->in_todo\*(C'\fR to determine if you are currently inside a \s-1TODO\s0 block. .Sp \&\f(CW\*(C`todo()\*(C'\fR is about finding the right package to look for \f(CW$TODO\fR in. It's pretty good at guessing the right package to look at. It first looks for the caller based on \f(CW\*(C`$Level + 1\*(C'\fR, since \f(CW\*(C`todo()\*(C'\fR is usually called inside a test function. As a last resort it will use \f(CW\*(C`exported_to()\*(C'\fR. .Sp Sometimes there is some confusion about where \f(CW\*(C`todo()\*(C'\fR should be looking for the \f(CW$TODO\fR variable. If you want to be sure, tell it explicitly what \f(CW$pack\fR to use. .IP "\fBfind_TODO\fR" 4 .IX Item "find_TODO" .Vb 2 \& my $todo_reason = $Test\->find_TODO(); \& my $todo_reason = $Test\->find_TODO($pack); .Ve .Sp Like \f(CW\*(C`todo()\*(C'\fR but only returns the value of \f(CW$TODO\fR ignoring \&\f(CW\*(C`todo_start()\*(C'\fR. .Sp Can also be used to set \f(CW$TODO\fR to a new value while returning the old value: .Sp .Vb 1 \& my $old_reason = $Test\->find_TODO($pack, 1, $new_reason); .Ve .IP "\fBin_todo\fR" 4 .IX Item "in_todo" .Vb 1 \& my $in_todo = $Test\->in_todo; .Ve .Sp Returns true if the test is currently inside a \s-1TODO\s0 block. .IP "\fBtodo_start\fR" 4 .IX Item "todo_start" .Vb 2 \& $Test\->todo_start(); \& $Test\->todo_start($message); .Ve .Sp This method allows you declare all subsequent tests as \s-1TODO\s0 tests, up until the \f(CW\*(C`todo_end\*(C'\fR method has been called. .Sp The \f(CW\*(C`TODO:\*(C'\fR and \f(CW$TODO\fR syntax is generally pretty good about figuring out whether or not we're in a \s-1TODO\s0 test. However, often we find that this is not possible to determine (such as when we want to use \f(CW$TODO\fR but the tests are being executed in other packages which can't be inferred beforehand). .Sp Note that you can use this to nest \*(L"todo\*(R" tests .Sp .Vb 6 \& $Test\->todo_start(\*(Aqworking on this\*(Aq); \& # lots of code \& $Test\->todo_start(\*(Aqworking on that\*(Aq); \& # more code \& $Test\->todo_end; \& $Test\->todo_end; .Ve .Sp This is generally not recommended, but large testing systems often have weird internal needs. .Sp We've tried to make this also work with the \s-1TODO:\s0 syntax, but it's not guaranteed and its use is also discouraged: .Sp .Vb 9 \& TODO: { \& local $TODO = \*(AqWe have work to do!\*(Aq; \& $Test\->todo_start(\*(Aqworking on this\*(Aq); \& # lots of code \& $Test\->todo_start(\*(Aqworking on that\*(Aq); \& # more code \& $Test\->todo_end; \& $Test\->todo_end; \& } .Ve .Sp Pick one style or another of \*(L"\s-1TODO\*(R"\s0 to be on the safe side. .ie n .IP """todo_end""" 4 .el .IP "\f(CWtodo_end\fR" 4 .IX Item "todo_end" .Vb 1 \& $Test\->todo_end; .Ve .Sp Stops running tests as \*(L"\s-1TODO\*(R"\s0 tests. This method is fatal if called without a preceding \f(CW\*(C`todo_start\*(C'\fR method call. .IP "\fBcaller\fR" 4 .IX Item "caller" .Vb 3 \& my $package = $Test\->caller; \& my($pack, $file, $line) = $Test\->caller; \& my($pack, $file, $line) = $Test\->caller($height); .Ve .Sp Like the normal \f(CW\*(C`caller()\*(C'\fR, except it reports according to your \f(CW\*(C`level()\*(C'\fR. .Sp \&\f(CW$height\fR will be added to the \f(CW\*(C`level()\*(C'\fR. .Sp If \f(CW\*(C`caller()\*(C'\fR winds up off the top of the stack it report the highest context. .SH "EXIT CODES" .IX Header "EXIT CODES" If all your tests passed, Test::Builder will exit with zero (which is normal). If anything failed it will exit with how many failed. If you run less (or more) tests than you planned, the missing (or extras) will be considered failures. If no tests were ever run Test::Builder will throw a warning and exit with 255. If the test died, even after having successfully completed all its tests, it will still be considered a failure and will exit with 255. .PP So the exit codes are... .PP .Vb 3 \& 0 all tests successful \& 255 test died or all passed but wrong # of tests run \& any other number how many failed (including missing or extras) .Ve .PP If you fail more than 254 tests, it will be reported as 254. .SH "THREADS" .IX Header "THREADS" In perl 5.8.1 and later, Test::Builder is thread-safe. The test number is shared by all threads. This means if one thread sets the test number using \&\f(CW\*(C`current_test()\*(C'\fR they will all be effected. .PP While versions earlier than 5.8.1 had threads they contain too many bugs to support. .PP Test::Builder is only thread-aware if threads.pm is loaded \fIbefore\fR Test::Builder. .PP You can directly disable thread support with one of the following: .PP .Vb 1 \& $ENV{T2_NO_IPC} = 1 .Ve .PP or .PP .Vb 1 \& no Test2::IPC; .Ve .PP or .PP .Vb 1 \& Test2::API::test2_ipc_disable() .Ve .SH "MEMORY" .IX Header "MEMORY" An informative hash, accessible via \f(CW\*(C`details()\*(C'\fR, is stored for each test you perform. So memory usage will scale linearly with each test run. Although this is not a problem for most test suites, it can become an issue if you do large (hundred thousands to million) combinatorics tests in the same run. .PP In such cases, you are advised to either split the test file into smaller ones, or use a reverse approach, doing \*(L"normal\*(R" (code) compares and triggering \f(CW\*(C`fail()\*(C'\fR should anything go unexpected. .PP Future versions of Test::Builder will have a way to turn history off. .SH "EXAMPLES" .IX Header "EXAMPLES" \&\s-1CPAN\s0 can provide the best examples. Test::Simple, Test::More, Test::Exception and Test::Differences all use Test::Builder. .SH "SEE ALSO" .IX Header "SEE ALSO" .SS "\s-1INTERNALS\s0" .IX Subsection "INTERNALS" Test2, Test2::API .SS "\s-1LEGACY\s0" .IX Subsection "LEGACY" Test::Simple, Test::More .SS "\s-1EXTERNAL\s0" .IX Subsection "EXTERNAL" Test::Harness .SH "AUTHORS" .IX Header "AUTHORS" Original code by chromatic, maintained by Michael G Schwern <schwern@pobox.com> .SH "MAINTAINERS" .IX Header "MAINTAINERS" .IP "Chad Granum <exodist@cpan.org>" 4 .IX Item "Chad Granum <exodist@cpan.org>" .SH "COPYRIGHT" .IX Header "COPYRIGHT" Copyright 2002\-2008 by chromatic <chromatic@wgz.org> and Michael G Schwern <schwern@pobox.com>. .PP This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. .PP See \fIhttp://www.perl.com/perl/misc/Artistic.html\fR
Close