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 /
CPAN-Meta-YAML /
t /
Delete
Unzip
Name
Size
Permission
Date
Action
data
[ DIR ]
drwxr-xr-x
2015-02-14 16:55
lib
[ DIR ]
drwxr-xr-x
2015-02-14 16:55
tml-local
[ DIR ]
drwxr-xr-x
2015-02-14 16:55
tml-spec
[ DIR ]
drwxr-xr-x
2015-02-14 16:55
tml-world
[ DIR ]
drwxr-xr-x
2015-02-14 16:55
01_api.t
1.52
KB
-r--r--r--
2014-12-27 11:48
01_compile.t
363
B
-r--r--r--
2014-12-27 11:48
10_read.t
3.35
KB
-r--r--r--
2014-12-27 11:48
11_read_string.t
1.63
KB
-r--r--r--
2014-12-27 11:48
12_write.t
2.72
KB
-r--r--r--
2014-12-27 11:48
13_write_string.t
642
B
-r--r--r--
2014-12-27 11:48
20_subclass.t
1005
B
-r--r--r--
2014-12-27 11:48
21_yamlpm_compat.t
1.64
KB
-r--r--r--
2014-12-27 11:48
30_yaml_spec_tml.t
929
B
-r--r--r--
2014-12-27 11:48
31_local_tml.t
482
B
-r--r--r--
2014-12-27 11:48
32_world_tml.t
186
B
-r--r--r--
2014-12-27 11:48
README.md
6.15
KB
-r--r--r--
2014-12-27 11:48
tml
3.3
KB
-r-xr-xr-x
2014-12-27 11:48
Save
Rename
use strict; use warnings; use utf8; use lib 't/lib/'; use Test::More 0.99; use TestUtils; use TestBridge; use CPAN::Meta::YAML; #--------------------------------------------------------------------------# # read() should read these files without error #--------------------------------------------------------------------------# my %passes = ( array => { file => 'ascii.yml', perl => [ [ 'foo' ] ], }, 'multibyte UTF-8' => { file => 'multibyte.yml', perl => [ { author => 'Ævar Arnfjörð Bjarmason <avar@cpan.org>' } ], utf8 => 'author', }, 'UTF-8 BOM' => { file => 'utf_8_bom.yml', perl => [ { author => 'Ævar Arnfjörð Bjarmason <avar@cpan.org>' } ], utf8 => 'author', }, ); for my $key ( sort keys %passes ) { subtest $key => sub { my $case = $passes{$key}; my $file = test_data_file( $case->{file} ); ok( -f $file, "Found $case->{file}" ); my $got = eval { CPAN::Meta::YAML->read( $file ) }; is( $@, '', "CPAN::Meta::YAML reads without exception" ); SKIP: { skip( "Shortcutting after failure", 2 ) if $@; isa_ok( $got, 'CPAN::Meta::YAML' ) or diag "ERROR: " . CPAN::Meta::YAML->errstr; cmp_deeply( $got, $case->{perl}, "CPAN::Meta::YAML parses correctly" ); } if ( $case->{utf8} ) { ok( utf8::is_utf8( $got->[0]->{$case->{utf8}} ), "utf8 decoded" ); } # test that read method on object is also a constructor ok( my $got2 = eval { $got->read( $file ) }, "read() object method"); isnt( $got, $got2, "objects are different" ); cmp_deeply( $got, $got2, "objects have same content" ); } } #--------------------------------------------------------------------------# # read() should fail to read these files and provide expected errors #--------------------------------------------------------------------------# my %errors = ( 'latin1.yml' => qr/latin1\.yml.*does not map to Unicode/, 'utf_16_le_bom.yml' => qr/utf_16_le_bom\.yml.*does not map to Unicode/, ); for my $key ( sort keys %errors ) { subtest $key => sub { my $file = test_data_file( $key ); ok( -f $file, "Found $key" ); my $result = eval { CPAN::Meta::YAML->read( $file ) }; ok( !$result, "returned false" ); error_like( $errors{$key}, "Got expected error" ); }; } # Additional errors without a file to read subtest "bad read arguments" => sub { eval { CPAN::Meta::YAML->read(); }; error_like(qr/You did not specify a file name/, "Got expected error: no filename provided to read()" ); eval { CPAN::Meta::YAML->read( test_data_file('nonexistent.yml') ); }; error_like(qr/File '.*?' does not exist/, "Got expected error: nonexistent filename provided to read()" ); eval { CPAN::Meta::YAML->read( test_data_directory() ); }; error_like(qr/'.*?' is a directory, not a file/, "Got expected error: directory provided to read()" ); }; done_testing; # # This file is part of CPAN-Meta-YAML # # This software is copyright (c) 2010 by Adam Kennedy. # # This is free software; you can redistribute it and/or modify it under # the same terms as the Perl 5 programming language system itself. # # vim: ts=4 sts=4 sw=4 et: