Linux cpanel2.daytoncreative.net 2.6.32-754.29.2.el6.x86_64 #1 SMP Tue May 12 17:39:04 UTC 2020 x86_64
Apache/2.4.43 (cPanel) OpenSSL/1.1.1g mod_bwlimited/1.4
Server IP : 70.62.220.67 & Your IP : 216.73.216.193
Domains :
Cant Read [ /etc/named.conf ]
User : michaelgreg
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
var /
log /
perl-5.20.2 /
cpan /
Test-Harness /
t /
Delete
Unzip
Name
Size
Permission
Date
Action
compat
[ DIR ]
drwxr-xr-x
2015-02-14 16:55
data
[ DIR ]
drwxr-xr-x
2015-02-14 16:55
lib
[ DIR ]
drwxr-xr-x
2015-02-14 16:55
proverc
[ DIR ]
drwxr-xr-x
2015-02-14 16:55
sample-tests
[ DIR ]
drwxr-xr-x
2015-02-14 16:55
source_tests
[ DIR ]
drwxr-xr-x
2016-10-10 18:24
subclass_tests
[ DIR ]
drwxr-xr-x
2015-02-14 16:55
aggregator.t
9.35
KB
-r--r--r--
2014-12-27 11:48
bailout.t
3.12
KB
-r--r--r--
2014-12-27 11:48
base.t
4.68
KB
-r--r--r--
2014-12-27 11:48
callbacks.t
2.57
KB
-r--r--r--
2014-12-27 11:48
console.t
1.06
KB
-r--r--r--
2014-12-27 11:48
errors.t
4.64
KB
-r--r--r--
2014-12-27 11:48
file.t
13.61
KB
-r--r--r--
2014-12-27 11:48
glob-to-regexp.t
988
B
-r--r--r--
2014-12-27 11:48
grammar.t
11.55
KB
-r--r--r--
2014-12-27 11:48
harness-bailout.t
1.19
KB
-r--r--r--
2014-12-27 11:48
harness-subclass.t
1.58
KB
-r--r--r--
2014-12-27 11:48
harness.t
28.38
KB
-r--r--r--
2014-12-27 11:48
iterator_factory.t
4.8
KB
-r--r--r--
2014-12-27 11:48
iterators.t
5.68
KB
-r--r--r--
2014-12-27 11:48
multiplexer.t
4.53
KB
-r--r--r--
2014-12-27 11:48
nested.t
860
B
-r--r--r--
2014-12-27 11:48
nofork-mux.t
119
B
-r--r--r--
2014-12-27 11:48
nofork.t
1.55
KB
-r--r--r--
2014-12-27 11:48
object.t
772
B
-r--r--r--
2014-12-27 11:48
parse.t
30.97
KB
-r--r--r--
2014-12-27 11:48
parser-config.t
731
B
-r--r--r--
2014-12-27 11:48
parser-subclass.t
2.2
KB
-r--r--r--
2014-12-27 11:48
perl5lib.t
1.13
KB
-r--r--r--
2014-12-27 11:48
premature-bailout.t
2.32
KB
-r--r--r--
2014-12-27 11:48
process.t
1015
B
-r--r--r--
2014-12-27 11:48
prove.t
47.6
KB
-r--r--r--
2014-12-27 11:49
proveenv.t
338
B
-r--r--r--
2014-12-27 11:49
proverc.t
472
B
-r--r--r--
2014-12-27 11:48
proverun.t
4.14
KB
-r--r--r--
2014-12-27 11:48
proveversion.t
763
B
-r--r--r--
2014-12-27 11:48
regression.t
111.62
KB
-r--r--r--
2014-12-27 11:48
results.t
7.68
KB
-r--r--r--
2014-12-27 11:48
scheduler.t
5.33
KB
-r--r--r--
2014-12-27 11:48
source.t
8.21
KB
-r--r--r--
2014-12-27 11:48
source_handler.t
12.32
KB
-r--r--r--
2014-12-27 11:48
spool.t
3.12
KB
-r--r--r--
2014-12-27 11:48
state.t
7.7
KB
-r--r--r--
2014-12-27 11:48
state_results.t
4.95
KB
-r--r--r--
2014-12-27 11:48
streams.t
6.33
KB
-r--r--r--
2014-12-27 11:48
taint.t
1.3
KB
-r--r--r--
2014-12-27 11:49
testargs.t
4.95
KB
-r--r--r--
2014-12-27 11:48
unicode.t
3.73
KB
-r--r--r--
2014-12-27 11:48
yamlish-output.t
2.44
KB
-r--r--r--
2014-12-27 11:48
yamlish-writer.t
7.17
KB
-r--r--r--
2014-12-27 11:48
yamlish.t
15.01
KB
-r--r--r--
2014-12-27 11:48
Save
Rename
#!/usr/bin/perl -wT use strict; use warnings; use lib 't/lib'; use Test::More tests => 23; use TAP::Parser; my $plan_line = 'TAP::Parser::Result::Plan'; my $test_line = 'TAP::Parser::Result::Test'; sub _parser { my $parser = TAP::Parser->new( { tap => shift } ); $parser->run; return $parser; } # validate that plan! my $parser = _parser(<<'END_TAP'); ok 1 - input file opened not ok 2 - first line of the input valid # todo some data ok 3 - read the rest of the file 1..3 # comments are allowed after an ending plan END_TAP can_ok $parser, 'parse_errors'; ok !$parser->parse_errors, '... comments should be allowed after a terminating plan'; $parser = _parser(<<'END_TAP'); ok 1 - input file opened not ok 2 - first line of the input valid # todo some data ok 3 - read the rest of the file 1..3 # yeah, yeah, I know. ok END_TAP can_ok $parser, 'parse_errors'; is scalar $parser->parse_errors, 2, '... and we should have two parse errors'; is [ $parser->parse_errors ]->[0], 'Plan (1..3) must be at the beginning or end of the TAP output', '... telling us that our plan was misplaced'; is [ $parser->parse_errors ]->[1], 'Bad plan. You planned 3 tests but ran 4.', '... and telling us we ran the wrong number of tests.'; $parser = _parser(<<'END_TAP'); ok 1 - input file opened not ok 2 - first line of the input valid # todo some data ok 3 - read the rest of the file #1..3 # yo quiero tests! 1..3 END_TAP ok !$parser->parse_errors, '... but test plan-like data can be in a comment'; $parser = _parser(<<'END_TAP'); ok 1 - input file opened not ok 2 - first line of the input valid # todo some data ok 3 - read the rest of the file 1..5 # yo quiero tests! 1..3 END_TAP ok !$parser->parse_errors, '... or a description'; $parser = _parser(<<'END_TAP'); ok 1 - input file opened not ok 2 - first line of the input valid # todo 1..4 ok 3 - read the rest of the file # yo quiero tests! 1..3 END_TAP ok !$parser->parse_errors, '... or a directive'; # test numbers included? $parser = _parser(<<'END_TAP'); 1..3 ok 1 - input file opened not ok 2 - first line of the input valid # todo some data ok read the rest of the file # this is ... END_TAP eval { $parser->run }; ok !$@, 'We can mix and match the presence of test numbers'; $parser = _parser(<<'END_TAP'); 1..3 ok 1 - input file opened not ok 2 - first line of the input valid # todo some data ok 2 read the rest of the file END_TAP is + ( $parser->parse_errors )[0], 'Tests out of sequence. Found (2) but expected (3)', '... and if the numbers are there, they cannot be out of sequence'; $parser = _parser(<<'END_TAP'); ok 1 - input file opened not ok 2 - first line of the input valid # todo some data ok 2 read the rest of the file END_TAP is $parser->parse_errors, 2, 'Having two errors in the TAP should result in two errors (duh)'; my $expected = [ 'Tests out of sequence. Found (2) but expected (3)', 'No plan found in TAP output' ]; is_deeply [ $parser->parse_errors ], $expected, '... and they should be the correct errors'; $parser = _parser(<<'END_TAP'); ok 1 - input file opened not ok 2 - first line of the input valid # todo some data ok 3 read the rest of the file END_TAP is $parser->parse_errors, 1, 'Having no plan should cause an error'; is + ( $parser->parse_errors )[0], 'No plan found in TAP output', '... with a correct error message'; $parser = _parser(<<'END_TAP'); 1..3 ok 1 - input file opened not ok 2 - first line of the input valid # todo some data ok 3 read the rest of the file 1..3 END_TAP is $parser->parse_errors, 1, 'Having more than one plan should cause an error'; is + ( $parser->parse_errors )[0], 'More than one plan found in TAP output', '... with a correct error message'; can_ok $parser, 'is_good_plan'; $parser = _parser(<<'END_TAP'); 1..2 ok 1 - input file opened not ok 2 - first line of the input valid # todo some data ok 3 read the rest of the file END_TAP is $parser->parse_errors, 1, 'Having the wrong number of planned tests is a parse error'; is + ( $parser->parse_errors )[0], 'Bad plan. You planned 2 tests but ran 3.', '... with a correct error message'; # XXX internals: plan will not set to true if defined $parser->is_good_plan(undef); $parser = _parser(<<'END_TAP'); ok 1 - input file opened 1..1 END_TAP ok $parser->is_good_plan, '... and it should return true if the plan is correct'; # TAP::Parser coverage tests { # good_plan coverage my @warn; eval { local $SIG{__WARN__} = sub { push @warn, @_ }; $parser->good_plan; }; is @warn, 1, 'coverage testing of good_plan'; like pop @warn, qr/good_plan[(][)] is deprecated. Please use "is_good_plan[(][)]"/, '...and it fell-back like we expected'; }