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.226.186.109
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 /
share /
doc /
perl-Test-Simple-0.98 /
t /
subtest /
[ HOME SHELL ]
Name
Size
Permission
Action
args.t
328
B
-rw-r--r--
basic.t
5.19
KB
-rw-r--r--
die.t
531
B
-rw-r--r--
do.t
274
B
-rw-r--r--
exceptions.t
1.81
KB
-rw-r--r--
for_do_t.test
112
B
-rw-r--r--
fork.t
1.22
KB
-rw-r--r--
implicit_done.t
479
B
-rw-r--r--
line_numbers.t
3.59
KB
-rw-r--r--
plan.t
1.34
KB
-rw-r--r--
predicate.t
4.38
KB
-rw-r--r--
singleton.t
712
B
-rw-r--r--
todo.t
5.27
KB
-rw-r--r--
wstat.t
369
B
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : exceptions.t
#!/usr/bin/perl -w BEGIN { if( $ENV{PERL_CORE} ) { chdir 't'; @INC = ( '../lib', 'lib' ); } else { unshift @INC, 't/lib'; } } use strict; use warnings; use Test::Builder::NoOutput; use Test::More tests => 7; { my $tb = Test::Builder::NoOutput->create; $tb->child('one'); eval { $tb->child('two') }; my $error = $@; like $error, qr/\QYou already have a child named (one) running/, 'Trying to create a child with another one active should fail'; } { my $tb = Test::Builder::NoOutput->create; my $child = $tb->child('one'); ok my $child2 = $child->child('two'), 'Trying to create nested children should succeed'; eval { $child->finalize }; my $error = $@; like $error, qr/\QCan't call finalize() with child (two) active/, '... but trying to finalize() a child with open children should fail'; } { my $tb = Test::Builder::NoOutput->create; my $child = $tb->child('one'); undef $child; like $tb->read, qr/\QChild (one) exited without calling finalize()/, 'Failing to call finalize should issue an appropriate diagnostic'; ok !$tb->is_passing, '... and should cause the test suite to fail'; } { my $tb = Test::Builder::NoOutput->create; $tb->plan( tests => 7 ); for( 1 .. 3 ) { $tb->ok( $_, "We're on $_" ); $tb->diag("We ran $_"); } { my $indented = $tb->child; $indented->plan('no_plan'); $indented->ok( 1, "We're on 1" ); eval { $tb->ok( 1, 'This should throw an exception' ) }; $indented->finalize; } my $error = $@; like $error, qr/\QCannot run test (This should throw an exception) with active children/, 'Running a test with active children should fail'; ok !$tb->is_passing, '... and should cause the test suite to fail'; }
Close