����JFIF��������� Mr.X
  
  __  __    __   __  _____      _            _          _____ _          _ _ 
 |  \/  |   \ \ / / |  __ \    (_)          | |        / ____| |        | | |
 | \  / |_ __\ V /  | |__) | __ ___   ____ _| |_ ___  | (___ | |__   ___| | |
 | |\/| | '__|> <   |  ___/ '__| \ \ / / _` | __/ _ \  \___ \| '_ \ / _ \ | |
 | |  | | |_ / . \  | |   | |  | |\ V / (_| | ||  __/  ____) | | | |  __/ | |
 |_|  |_|_(_)_/ \_\ |_|   |_|  |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1
 if you need WebShell for Seo everyday contact me on Telegram
 Telegram Address : @jackleet
        
        
For_More_Tools: Telegram: @jackleet | Bulk Smtp support mail sender | Business Mail Collector | Mail Bouncer All Mail | Bulk Office Mail Validator | Html Letter private



Upload:

Command:

deexcl@216.73.217.71: ~ $
use strict;
use warnings;
use Test::More;
use YAML::XS;


my ($yaml, $data, @data);

subtest indent => sub {
    my $xs = YAML::XS->new( indent => 8 );
    $data = {
        this => {
            is => [ object => ori => "ented" ],
        },
    };

    $yaml = $xs->dump($data);

    my $exp = <<'EOM';
---
this:
        is:
        - object
        - ori
        - ented
EOM

    is $yaml, $exp, 'dump';
};

subtest header => sub {
    $data = { key => 'value' };

    my $xs = YAML::XS->new( header => 0 );
    $yaml = $xs->dump($data);
    my $exp = <<'EOM';
key: value
EOM
    is $yaml, $exp, 'header 0';

    $xs = YAML::XS->new( header => 1 );
    $yaml = $xs->dump($data);
    $exp = <<'EOM';
---
key: value
EOM
    is $yaml, $exp, 'header 1';

    $xs = YAML::XS->new;
    $yaml = $xs->dump($data);
    $exp = <<'EOM';
---
key: value
EOM
    is $yaml, $exp, 'header default';
};

subtest footer => sub {
    $data = { key => 'value' };

    my $xs = YAML::XS->new( footer => 0 );
    $yaml = $xs->dump($data);
    my $exp = <<'EOM';
---
key: value
EOM
    is $yaml, $exp, 'footer 0';

    $xs = YAML::XS->new( footer => 1 );
    $yaml = $xs->dump($data);
    $exp = <<'EOM';
---
key: value
...
EOM
    is $yaml, $exp, 'footer 1';

    $xs = YAML::XS->new;
    $yaml = $xs->dump($data);
    $exp = <<'EOM';
---
key: value
EOM
    is $yaml, $exp, 'footer default';
};

subtest require_footer => sub {
    my $yaml = <<'EOM';
---
key: value
---
x: y
...
EOM
    my $yaml2 = <<'EOM';
---
key: value
...
---
x: y
...
EOM

    my $xs = YAML::XS->new( require_footer => 1 );
    local $@;
    $data = eval { $xs->load($yaml) };
    like $@, qr{load: Document .1. did not end with '...'}, 'require_footer 1 failure';

    local $@;
    $data = eval { $xs->load($yaml2) };
    ok !$@, 'require_footer 1 success';

    local $@;
    $data = eval { $xs->load('') };
    like $@, qr{load: Document .0. did not end with '...'}, 'require_footer 1 empty doc failure';

    $xs = YAML::XS->new( require_footer => 0 );
    local $@;
    $data = eval { $xs->load($yaml) };
    ok !$@, 'require_footer 0';
};

subtest anchor_prefix => sub {
    my $xs = YAML::XS->new( anchor_prefix => 'a_' );
    my $ref = ['yaml rocks'];
    my $ref2 = ['another ref'];
    my $yaml = $xs->dump([$ref, $ref, $ref2, $ref2]);
    my $exp = <<'EOM';
---
- &a_1
  - yaml rocks
- *a_1
- &a_2
  - another ref
- *a_2
EOM
    is $yaml, $exp, 'anchor_prefix';
};

subtest width => sub {
    my $xs = YAML::XS->new;
    my $string = "012345678 9" x 10;
    my $yaml = $xs->dump($string);
    my $exp = <<'EOM';
--- 012345678 9012345678 9012345678 9012345678 9012345678 9012345678 9012345678 9012345678
  9012345678 9012345678 9
EOM
    is $yaml, $exp, "default width";

    $xs = YAML::XS->new(width => 5);
    $string = "012345678 9" x 10;
    $yaml = $xs->dump($string);
    $exp = <<'EOM';
--- 012345678
  9012345678
  9012345678
  9012345678
  9012345678
  9012345678
  9012345678
  9012345678
  9012345678
  9012345678
  9
EOM
    is $yaml, $exp, "width=5";

    $xs = YAML::XS->new(width => -1);
    $string = "012345678 9" x 10;
    $yaml = $xs->dump($string);
    $exp = <<'EOM';
--- 012345678 9012345678 9012345678 9012345678 9012345678 9012345678 9012345678 9012345678 9012345678 9012345678 9
EOM
    is $yaml, $exp, "width=-1";
};

done_testing;

Filemanager

Name Type Size Permission Actions
10-basic.t File 1.48 KB 0644
11-schema.t File 4.7 KB 0644
12-alias.t File 1.36 KB 0644
13-utf8.t File 1.79 KB 0644
14-options.pl File 3.25 KB 0644
schema-core.yaml File 10.31 KB 0644