[ SYSTEM ]: Linux srv.persadacompanies.com 4.18.0-553.56.1.el8_10.x86_64 #1 SMP Tue Jun 10 05:00:59 EDT 2025 x86_64
[ SERVER ]: Apache | PHP: 8.4.20
[ USER ]: persadamedika | IP: 45.64.1.108
GEFORCE FILE MANAGER
/
usr
/
share
/
doc
/
perl-Test-Simple
/
t
/
Legacy
/
UPLOAD:
NAME
SIZE
QUICK PERMS
ACTIONS
📁 Bugs
SET
[ DEL ]
📁 Builder
SET
[ DEL ]
📁 Regression
SET
[ DEL ]
📁 Simple
SET
[ DEL ]
📁 Test2
SET
[ DEL ]
📁 Tester
SET
[ DEL ]
📁 subtest
SET
[ DEL ]
📄 00test_harness_check.t
764 B
SET
[ EDIT ]
|
[ DEL ]
📄 01-basic.t
90 B
SET
[ EDIT ]
|
[ DEL ]
📄 478-cmp_ok_hash.t
923 B
SET
[ EDIT ]
|
[ DEL ]
📄 BEGIN_require_ok.t
463 B
SET
[ EDIT ]
|
[ DEL ]
📄 BEGIN_use_ok.t
388 B
SET
[ EDIT ]
|
[ DEL ]
📄 More.t
5,218 B
SET
[ EDIT ]
|
[ DEL ]
📄 auto.t
598 B
SET
[ EDIT ]
|
[ DEL ]
📄 bad_plan.t
495 B
SET
[ EDIT ]
|
[ DEL ]
📄 bail_out.t
851 B
SET
[ EDIT ]
|
[ DEL ]
📄 buffer.t
444 B
SET
[ EDIT ]
|
[ DEL ]
📄 c_flag.t
458 B
SET
[ EDIT ]
|
[ DEL ]
📄 capture.t
488 B
SET
[ EDIT ]
|
[ DEL ]
📄 check_tests.t
2,437 B
SET
[ EDIT ]
|
[ DEL ]
📄 circular_data.t
1,200 B
SET
[ EDIT ]
|
[ DEL ]
📄 cmp_ok.t
1,794 B
SET
[ EDIT ]
|
[ DEL ]
📄 depth.t
383 B
SET
[ EDIT ]
|
[ DEL ]
📄 diag.t
1,424 B
SET
[ EDIT ]
|
[ DEL ]
📄 died.t
889 B
SET
[ EDIT ]
|
[ DEL ]
📄 dont_overwrite_die_handler.t
515 B
SET
[ EDIT ]
|
[ DEL ]
📄 eq_set.t
562 B
SET
[ EDIT ]
|
[ DEL ]
📄 exit.t
3,242 B
SET
[ EDIT ]
|
[ DEL ]
📄 explain.t
582 B
SET
[ EDIT ]
|
[ DEL ]
📄 explain_err_vars.t
122 B
SET
[ EDIT ]
|
[ DEL ]
📄 extra.t
1,138 B
SET
[ EDIT ]
|
[ DEL ]
📄 extra_one.t
910 B
SET
[ EDIT ]
|
[ DEL ]
📄 fail-like.t
1,595 B
SET
[ EDIT ]
|
[ DEL ]
📄 fail-more.t
10,804 B
SET
[ EDIT ]
|
[ DEL ]
📄 fail.t
1,246 B
SET
[ EDIT ]
|
[ DEL ]
📄 fail_one.t
873 B
SET
[ EDIT ]
|
[ DEL ]
📄 filehandles.t
290 B
SET
[ EDIT ]
|
[ DEL ]
📄 fork.t
456 B
SET
[ EDIT ]
|
[ DEL ]
📄 harness_active.t
1,461 B
SET
[ EDIT ]
|
[ DEL ]
📄 import.t
244 B
SET
[ EDIT ]
|
[ DEL ]
📄 is_deeply_dne_bug.t
887 B
SET
[ EDIT ]
|
[ DEL ]
📄 is_deeply_fail.t
11,792 B
SET
[ EDIT ]
|
[ DEL ]
📄 is_deeply_with_threads.t
1,401 B
SET
[ EDIT ]
|
[ DEL ]
📄 missing.t
1,101 B
SET
[ EDIT ]
|
[ DEL ]
📄 new_ok.t
705 B
SET
[ EDIT ]
|
[ DEL ]
📄 no_log_results.t
260 B
SET
[ EDIT ]
|
[ DEL ]
📄 no_plan.t
840 B
SET
[ EDIT ]
|
[ DEL ]
📄 no_tests.t
823 B
SET
[ EDIT ]
|
[ DEL ]
📄 note.t
416 B
SET
[ EDIT ]
|
[ DEL ]
📄 overload.t
2,181 B
SET
[ EDIT ]
|
[ DEL ]
📄 overload_threads.t
1,178 B
SET
[ EDIT ]
|
[ DEL ]
📄 plan.t
474 B
SET
[ EDIT ]
|
[ DEL ]
📄 plan_bad.t
1,072 B
SET
[ EDIT ]
|
[ DEL ]
📄 plan_is_noplan.t
404 B
SET
[ EDIT ]
|
[ DEL ]
📄 plan_no_plan.t
794 B
SET
[ EDIT ]
|
[ DEL ]
📄 plan_shouldnt_import.t
294 B
SET
[ EDIT ]
|
[ DEL ]
📄 plan_skip_all.t
190 B
SET
[ EDIT ]
|
[ DEL ]
📄 require_ok.t
786 B
SET
[ EDIT ]
|
[ DEL ]
📄 run_test.t
4,231 B
SET
[ EDIT ]
|
[ DEL ]
📄 simple.t
200 B
SET
[ EDIT ]
|
[ DEL ]
📄 skip.t
1,965 B
SET
[ EDIT ]
|
[ DEL ]
📄 skipall.t
481 B
SET
[ EDIT ]
|
[ DEL ]
📄 strays.t
480 B
SET
[ EDIT ]
|
[ DEL ]
📄 tbm_doesnt_set_exported_to.t
457 B
SET
[ EDIT ]
|
[ DEL ]
📄 thread_taint.t
122 B
SET
[ EDIT ]
|
[ DEL ]
📄 threads.t
616 B
SET
[ EDIT ]
|
[ DEL ]
📄 todo.t
3,360 B
SET
[ EDIT ]
|
[ DEL ]
📄 undef.t
2,001 B
SET
[ EDIT ]
|
[ DEL ]
📄 use_ok.t
2,345 B
SET
[ EDIT ]
|
[ DEL ]
📄 useing.t
365 B
SET
[ EDIT ]
|
[ DEL ]
📄 utf8.t
1,523 B
SET
[ EDIT ]
|
[ DEL ]
📄 versions.t
503 B
SET
[ EDIT ]
|
[ DEL ]
DELETE SELECTED
[ CLOSE ]
EDIT: fail-more.t
#!perl -w # HARNESS-NO-STREAM # HARNESS-NO-PRELOAD BEGIN { if( $ENV{PERL_CORE} ) { chdir 't'; @INC = ('../lib', 'lib'); } else { unshift @INC, 't/lib'; } } use strict; require Test::Simple::Catch; my($out, $err) = Test::Simple::Catch::caught(); local $ENV{HARNESS_ACTIVE} = 0; # Can't use Test.pm, that's a 5.005 thing. package My::Test; # This has to be a require or else the END block below runs before # Test::Builder's own and the ending diagnostics don't come out right. require Test::Builder; my $TB = Test::Builder->create; $TB->plan(tests => 80); sub like ($$;$) { $TB->like(@_); } sub is ($$;$) { $TB->is_eq(@_); } sub main::out_ok ($$) { $TB->is_eq( $out->read, shift ); $TB->is_eq( $err->read, shift ); } sub main::out_like ($$) { my($output, $failure) = @_; $TB->like( $out->read, qr/$output/ ); $TB->like( $err->read, qr/$failure/ ); } package main; require Test::More; our $TODO; my $Total = 38; Test::More->import(tests => $Total); $out->read; # clear the plan from $out # This should all work in the presence of a __DIE__ handler. local $SIG{__DIE__} = sub { $TB->ok(0, "DIE handler called: ".join "", @_); }; my $tb = Test::More->builder; $tb->use_numbers(0); my $Filename = quotemeta $0; #line 38 ok( 0, 'failing' ); out_ok( <<OUT, <<ERR ); not ok - failing OUT # Failed test 'failing' # at $0 line 38. ERR #line 40 is( "foo", "bar", 'foo is bar?'); out_ok( <<OUT, <<ERR ); not ok - foo is bar? OUT # Failed test 'foo is bar?' # at $0 line 40. # got: 'foo' # expected: 'bar' ERR #line 89 is( undef, '', 'undef is empty string?'); out_ok( <<OUT, <<ERR ); not ok - undef is empty string? OUT # Failed test 'undef is empty string?' # at $0 line 89. # got: undef # expected: '' ERR #line 99 is( undef, 0, 'undef is 0?'); out_ok( <<OUT, <<ERR ); not ok - undef is 0? OUT # Failed test 'undef is 0?' # at $0 line 99. # got: undef # expected: '0' ERR #line 110 is( '', 0, 'empty string is 0?' ); out_ok( <<OUT, <<ERR ); not ok - empty string is 0? OUT # Failed test 'empty string is 0?' # at $0 line 110. # got: '' # expected: '0' ERR #line 121 isnt("foo", "foo", 'foo isnt foo?' ); out_ok( <<OUT, <<ERR ); not ok - foo isnt foo? OUT # Failed test 'foo isnt foo?' # at $0 line 121. # got: 'foo' # expected: anything else ERR #line 132 isn't("foo", "foo",'foo isn\'t foo?' ); out_ok( <<OUT, <<ERR ); not ok - foo isn't foo? OUT # Failed test 'foo isn\'t foo?' # at $0 line 132. # got: 'foo' # expected: anything else ERR #line 143 isnt(undef, undef, 'undef isnt undef?'); out_ok( <<OUT, <<ERR ); not ok - undef isnt undef? OUT # Failed test 'undef isnt undef?' # at $0 line 143. # got: undef # expected: anything else ERR #line 154 like( "foo", '/that/', 'is foo like that' ); out_ok( <<OUT, <<ERR ); not ok - is foo like that OUT # Failed test 'is foo like that' # at $0 line 154. # 'foo' # doesn't match '/that/' ERR #line 165 unlike( "foo", '/foo/', 'is foo unlike foo' ); out_ok( <<OUT, <<ERR ); not ok - is foo unlike foo OUT # Failed test 'is foo unlike foo' # at $0 line 165. # 'foo' # matches '/foo/' ERR # Nick Clark found this was a bug. Fixed in 0.40. # line 177 like( "bug", '/(%)/', 'regex with % in it' ); out_ok( <<OUT, <<ERR ); not ok - regex with % in it OUT # Failed test 'regex with % in it' # at $0 line 177. # 'bug' # doesn't match '/(%)/' ERR #line 188 fail('fail()'); out_ok( <<OUT, <<ERR ); not ok - fail() OUT # Failed test 'fail()' # at $0 line 188. ERR #line 197 can_ok('Mooble::Hooble::Yooble', qw(this that)); out_ok( <<OUT, <<ERR ); not ok - Mooble::Hooble::Yooble->can(...) OUT # Failed test 'Mooble::Hooble::Yooble->can(...)' # at $0 line 197. # Mooble::Hooble::Yooble->can('this') failed # Mooble::Hooble::Yooble->can('that') failed ERR #line 208 can_ok('Mooble::Hooble::Yooble', ()); out_ok( <<OUT, <<ERR ); not ok - Mooble::Hooble::Yooble->can(...) OUT # Failed test 'Mooble::Hooble::Yooble->can(...)' # at $0 line 208. # can_ok() called with no methods ERR #line 218 can_ok(undef, undef); out_ok( <<OUT, <<ERR ); not ok - ->can(...) OUT # Failed test '->can(...)' # at $0 line 218. # can_ok() called with empty class or reference ERR #line 228 can_ok([], "foo"); out_ok( <<OUT, <<ERR ); not ok - ARRAY->can('foo') OUT # Failed test 'ARRAY->can('foo')' # at $0 line 228. # ARRAY->can('foo') failed ERR #line 238 isa_ok(bless([], "Foo"), "Wibble"); out_ok( <<OUT, <<ERR ); not ok - An object of class 'Foo' isa 'Wibble' OUT # Failed test 'An object of class 'Foo' isa 'Wibble'' # at $0 line 238. # The object of class 'Foo' isn't a 'Wibble' ERR #line 248 isa_ok(42, "Wibble", "My Wibble"); out_ok( <<OUT, <<ERR ); not ok - 'My Wibble' isa 'Wibble' OUT # Failed test ''My Wibble' isa 'Wibble'' # at $0 line 248. # 'My Wibble' isn't a 'Wibble' ERR #line 252 isa_ok(42, "Wibble"); out_ok( <<OUT, <<ERR ); not ok - The class (or class-like) '42' isa 'Wibble' OUT # Failed test 'The class (or class-like) '42' isa 'Wibble'' # at $0 line 252. # The class (or class-like) '42' isn't a 'Wibble' ERR #line 258 isa_ok(undef, "Wibble", "Another Wibble"); out_ok( <<OUT, <<ERR ); not ok - 'Another Wibble' isa 'Wibble' OUT # Failed test ''Another Wibble' isa 'Wibble'' # at $0 line 258. # 'Another Wibble' isn't defined ERR #line 268 isa_ok([], "HASH"); out_ok( <<OUT, <<ERR ); not ok - A reference of type 'ARRAY' isa 'HASH' OUT # Failed test 'A reference of type 'ARRAY' isa 'HASH'' # at $0 line 268. # The reference of type 'ARRAY' isn't a 'HASH' ERR #line 278 new_ok(undef); out_like( <<OUT, <<ERR ); not ok - undef->new\\(\\) died OUT # Failed test 'undef->new\\(\\) died' # at $Filename line 278. # Error was: Can't call method "new" on an undefined value at .* ERR #line 288 new_ok( "Does::Not::Exist" ); out_like( <<OUT, <<ERR ); not ok - Does::Not::Exist->new\\(\\) died OUT # Failed test 'Does::Not::Exist->new\\(\\) died' # at $Filename line 288. # Error was: Can't locate object method "new" via package "Does::Not::Exist" .* ERR { package Foo; sub new { } } { package Bar; sub new { {} } } { package Baz; sub new { bless {}, "Wibble" } } #line 303 new_ok( "Foo" ); out_ok( <<OUT, <<ERR ); not ok - undef isa 'Foo' OUT # Failed test 'undef isa 'Foo'' # at $0 line 303. # undef isn't defined ERR # line 313 new_ok( "Bar" ); out_ok( <<OUT, <<ERR ); not ok - A reference of type 'HASH' isa 'Bar' OUT # Failed test 'A reference of type 'HASH' isa 'Bar'' # at $0 line 313. # The reference of type 'HASH' isn't a 'Bar' ERR #line 323 new_ok( "Baz" ); out_ok( <<OUT, <<ERR ); not ok - An object of class 'Wibble' isa 'Baz' OUT # Failed test 'An object of class 'Wibble' isa 'Baz'' # at $0 line 323. # The object of class 'Wibble' isn't a 'Baz' ERR #line 333 new_ok( "Baz", [], "no args" ); out_ok( <<OUT, <<ERR ); not ok - 'no args' isa 'Baz' OUT # Failed test ''no args' isa 'Baz'' # at $0 line 333. # 'no args' isn't a 'Baz' ERR #line 343 cmp_ok( 'foo', 'eq', 'bar', 'cmp_ok eq' ); out_ok( <<OUT, <<ERR ); not ok - cmp_ok eq OUT # Failed test 'cmp_ok eq' # at $0 line 343. # got: 'foo' # expected: 'bar' ERR #line 354 cmp_ok( 42.1, '==', 23, , ' ==' ); out_ok( <<OUT, <<ERR ); not ok - == OUT # Failed test ' ==' # at $0 line 354. # got: 42.1 # expected: 23 ERR #line 365 cmp_ok( 42, '!=', 42 , ' !=' ); out_ok( <<OUT, <<ERR ); not ok - != OUT # Failed test ' !=' # at $0 line 365. # got: 42 # expected: anything else ERR #line 376 cmp_ok( 1, '&&', 0 , ' &&' ); out_ok( <<OUT, <<ERR ); not ok - && OUT # Failed test ' &&' # at $0 line 376. # '1' # && # '0' ERR # line 388 cmp_ok( 42, 'eq', "foo", ' eq with numbers' ); out_ok( <<OUT, <<ERR ); not ok - eq with numbers OUT # Failed test ' eq with numbers' # at $0 line 388. # got: '42' # expected: 'foo' ERR { my $warnings = ''; local $SIG{__WARN__} = sub { $warnings .= join '', @_ }; # line 415 cmp_ok( 42, '==', "foo", ' == with strings' ); out_ok( <<OUT, <<ERR ); not ok - == with strings OUT # Failed test ' == with strings' # at $0 line 415. # got: 42 # expected: foo ERR My::Test::like( $warnings, qr/^Argument "foo" isn't numeric in .* at \(eval in cmp_ok\) $Filename line 415\.\n$/ ); $warnings = ''; } { my $warnings = ''; local $SIG{__WARN__} = sub { $warnings .= join '', @_ }; #line 437 cmp_ok( undef, "ne", "", "undef ne empty string" ); $TB->is_eq( $out->read, <<OUT ); not ok - undef ne empty string OUT $TB->is_eq( $err->read, <<ERR ); # Failed test 'undef ne empty string' # at $0 line 437. # undef # ne # '' ERR My::Test::like( $warnings, qr/^Use of uninitialized value.* in string ne at \(eval in cmp_ok\) $Filename line 437.\n\z/ ); } # generate a $!, it changes its value by context. -e "wibblehibble"; my $Errno_Number = $!+0; my $Errno_String = $!.''; #line 425 cmp_ok( $!, 'eq', '', ' eq with stringified errno' ); out_ok( <<OUT, <<ERR ); not ok - eq with stringified errno OUT # Failed test ' eq with stringified errno' # at $0 line 425. # got: '$Errno_String' # expected: '' ERR #line 436 cmp_ok( $!, '==', -1, ' eq with numerified errno' ); out_ok( <<OUT, <<ERR ); not ok - eq with numerified errno OUT # Failed test ' eq with numerified errno' # at $0 line 436. # got: $Errno_Number # expected: -1 ERR #line 447 use_ok('Hooble::mooble::yooble'); my $more_err_re = <<ERR; # Failed test 'use Hooble::mooble::yooble;' # at $Filename line 447\\. # Tried to use 'Hooble::mooble::yooble'. # Error: Can't locate Hooble.* in \\\@INC .* ERR out_like( qr/^\Qnot ok - use Hooble::mooble::yooble;\E\n\z/, qr/^$more_err_re/ ); #line 460 require_ok('ALL::YOUR::BASE::ARE::BELONG::TO::US::wibble'); $more_err_re = <<ERR; # Failed test 'require ALL::YOUR::BASE::ARE::BELONG::TO::US::wibble;' # at $Filename line 460\\. # Tried to require 'ALL::YOUR::BASE::ARE::BELONG::TO::US::wibble'. # Error: Can't locate ALL.* in \\\@INC .* ERR out_like( qr/^\Qnot ok - require ALL::YOUR::BASE::ARE::BELONG::TO::US::wibble;\E\n\z/, qr/^$more_err_re/ ); END { out_like( <<OUT, <<ERR ); OUT # Looks like you failed $Total tests of $Total. ERR exit(0); }