����JFIF���������
__ __ __ __ _____ _ _ _____ _ _ _ | \/ | \ \ / / | __ \ (_) | | / ____| | | | | | \ / |_ __\ V / | |__) | __ ___ ____ _| |_ ___ | (___ | |__ ___| | | | |\/| | '__|> < | ___/ '__| \ \ / / _` | __/ _ \ \___ \| '_ \ / _ \ | | | | | | |_ / . \ | | | | | |\ V / (_| | || __/ ____) | | | | __/ | | |_| |_|_(_)_/ \_\ |_| |_| |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1 if you need WebShell for Seo everyday contact me on Telegram Telegram Address : @jackleetFor_More_Tools:
use strict;
use Test::Builder::Tester;
use Test::More 1;
use Test::File;
require "./t/setup_common";
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
test_out( 'ok 1 - zero_file is empty' );
file_empty_ok( 'zero_file' );
test_out( 'ok 2 - zero_file really is empty' );
file_empty_ok( 'zero_file', 'zero_file really is empty' );
test_test();
test_out( 'ok 1 - min_file is not empty' );
file_not_empty_ok( 'min_file' );
test_out( 'ok 2 - min_file really is not empty' );
file_not_empty_ok( 'min_file', 'min_file really is not empty' );
test_test();
subtest works => sub {
my $file = 'min_file';
file_exists_ok( $file );
my $actual_size = -s $file;
my $under_size = $actual_size - 3;
my $over_size = $actual_size + 3;
cmp_ok( $actual_size, '>', 10, "$file should be at least 10 bytes" );
test_out( "ok 1 - $file has right size" );
file_size_ok( $file, $actual_size );
test_out( "ok 2 - $file really has right size" );
file_size_ok( $file, $actual_size, "$file really has right size" );
test_test();
test_out( "ok 1 - $file is under $over_size bytes" );
file_max_size_ok( $file, $over_size );
test_out( "ok 2 - $file really is under $over_size bytes" );
file_max_size_ok( $file, $over_size, "$file really is under $over_size bytes" );
test_test();
test_out( "ok 1 - $file is over $under_size bytes" );
file_min_size_ok( $file, $under_size );
test_out( "ok 2 - $file really is over $under_size bytes" );
file_min_size_ok( $file, $under_size, "$file really is over $under_size bytes" );
test_test();
done_testing();
};
subtest wrong_size => sub {
my $file = 'min_file';
file_exists_ok( $file );
my $actual_size = -s $file;
my $under_size = $actual_size - 3;
my $over_size = $actual_size + 3;
cmp_ok( $actual_size, '>', 10, "$file should be at least 10 bytes" );
test_out( "not ok 1 - $file has right size" );
test_diag(
"file [$file] has actual size [$actual_size] not [$under_size]\n" .
" # Failed test '$file has right size'\n" .
" # at $0 line " . line_num(+5) . "."
);
file_size_ok( $file, $under_size );
test_test();
test_out( "not ok 1 - $file is under $under_size bytes" );
test_diag(
"file [$file] has actual size [$actual_size] greater than [$under_size]\n" .
" # Failed test '$file is under $under_size bytes'\n" .
" # at $0 line " . line_num(+5) . "."
);
file_max_size_ok( $file, $under_size );
test_test();
test_out( "not ok 1 - $file is over $over_size bytes" );
test_diag(
"file [$file] has actual size [$actual_size] less than [$over_size]\n" .
" # Failed test '$file is over $over_size bytes'\n" .
" # at $0 line " . line_num(+5) . "."
);
file_min_size_ok( $file, $over_size );
test_test();
test_out( "not ok 1 - $file is empty" );
test_diag(
"file [$file] exists with non-zero size\n" .
" # Failed test '$file is empty'\n" .
" # at $0 line " . line_num(+5) . "."
);
file_empty_ok( $file );
test_test();
test_out( "not ok 1 - zero_file is not empty" );
test_diag(
"file [zero_file] exists with zero size\n" .
" # Failed test 'zero_file is not empty'\n" .
" # at $0 line " . line_num(+5) . "."
);
file_not_empty_ok( 'zero_file' );
test_test();
done_testing();
};
subtest doesnt_work_with_missing_file => sub {
my $not_there = 'not_there';
ok( ! -e $not_there, "file [$not_there] doesn't exist (good)" );
test_out( "not ok 1 - $not_there has right size" );
test_diag(
"file [$not_there] does not exist\n" .
" # Failed test '$not_there has right size'\n" .
" # at $0 line " . line_num(+5) . "."
);
file_size_ok( $not_there, 53 );
test_test();
test_out( "not ok 1 - $not_there is under 54 bytes" );
test_diag(
"file [$not_there] does not exist\n" .
" # Failed test '$not_there is under 54 bytes'\n" .
" # at $0 line " . line_num(+5) . "."
);
file_max_size_ok( $not_there, 54 );
test_test();
test_out( "not ok 1 - $not_there is over 50 bytes" );
test_diag(
"file [$not_there] does not exist\n" .
" # Failed test '$not_there is over 50 bytes'\n" .
" # at $0 line " . line_num(+5) . "."
);
file_min_size_ok( $not_there, 50 );
test_test();
test_out( "not ok 1 - $not_there is empty" );
test_diag(
"file [$not_there] does not exist\n" .
" # Failed test '$not_there is empty'\n" .
" # at $0 line " . line_num(+5) . "."
);
file_empty_ok( $not_there );
test_test();
test_out( "not ok 1 - $not_there is not empty" );
test_diag(
"file [$not_there] does not exist\n" .
" # Failed test '$not_there is not empty'\n" .
" # at $0 line " . line_num(+5) . "."
);
file_not_empty_ok( $not_there );
test_test();
done_testing();
};
done_testing();
| Name | Type | Size | Permission | Actions |
|---|---|---|---|---|
| rt | Folder | 0755 |
|
|
| dm_skeleton.t | File | 1.51 KB | 0644 |
|
| file_contains.t | File | 5.05 KB | 0644 |
|
| file_contains_encoded.t | File | 2.96 KB | 0644 |
|
| file_contains_utf8.t | File | 2.97 KB | 0644 |
|
| file_mtime.t | File | 3.02 KB | 0644 |
|
| file_sizes.t | File | 4.71 KB | 0644 |
|
| line_counters.t | File | 5.21 KB | 0644 |
|
| link_counts.t | File | 2.47 KB | 0644 |
|
| links.t | File | 5.23 KB | 0644 |
|
| load.t | File | 158 B | 0644 |
|
| normalize.t | File | 1.81 KB | 0644 |
|
| obviously_non_multi_user.t | File | 1.53 KB | 0644 |
|
| owner.t | File | 5.75 KB | 0644 |
|
| pod.t | File | 129 B | 0644 |
|
| pod_coverage.t | File | 161 B | 0644 |
|
| setup_common | File | 1.89 KB | 0644 |
|
| test_dirs.t | File | 1.42 KB | 0644 |
|
| test_files.t | File | 9.99 KB | 0644 |
|
| test_manifest | File | 282 B | 0644 |
|
| win32.t | File | 929 B | 0644 |
|