����JFIF���������
__ __ __ __ _____ _ _ _____ _ _ _ | \/ | \ \ / / | __ \ (_) | | / ____| | | | | | \ / |_ __\ V / | |__) | __ ___ ____ _| |_ ___ | (___ | |__ ___| | | | |\/| | '__|> < | ___/ '__| \ \ / / _` | __/ _ \ \___ \| '_ \ / _ \ | | | | | | |_ / . \ | | | | | |\ V / (_| | || __/ ____) | | | | __/ | | |_| |_|_(_)_/ \_\ |_| |_| |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1 if you need WebShell for Seo everyday contact me on Telegram Telegram Address : @jackleetFor_More_Tools:
use FindBin '$Bin';
use lib $Bin;
use TestYAMLTests tests => 19;
use Devel::Peek();
$YAML::XS::LoadBlessed = 1;
my $rx1 = qr/5050/;
my $yaml1 = Dump $rx1;
my $rx2 = qr/99999/;
bless $rx2, 'Classy';
my $yaml2 = Dump $rx2;
my $rx3 = qr/^edcba/mi;
my $yaml3 = Dump $rx3;
sub perl514 {
# https://rt.cpan.org/Ticket/Display.html?id=62266
skip "FIXME - perl-5.14 regexp stringification is different", shift || 1
if $] > 5.013
or $] < 5.010;
}
SKIP: { perl514 5;
is $yaml1, <<'...', 'Regular regexp dumps';
--- !!perl/regexp (?-xism:5050)
...
is $yaml2, <<'...', 'Blessed regular regexp dumps';
--- !!perl/regexp:Classy (?-xism:99999)
...
is $yaml3, <<'...', 'Regexp with flags dumps';
--- !!perl/regexp (?mi-xs:^edcba)
...
my $rx4 = bless $rx3, 'Bossy';
my $yaml4 = Dump $rx4;
is $yaml4, <<'...', 'Blessed regexp with flags dumps';
--- !!perl/regexp:Bossy (?mi-xs:^edcba)
...
my $unicode = "\x{100}";
my $rx5 = qr/\Q$unicode\E/;
my $yaml5 = Dump $rx5;
is $yaml5, <<"...", 'Unicode regexp dumps';
--- !!perl/regexp (?-xism:\xC4\x80)
...
}
my $rx1_ = Load($yaml1);
is ref($rx1_), 'Regexp', 'Can Load a regular regexp';
SKIP: { perl514;
is $rx1_, '(?-xism:5050)', 'Loaded regexp value is correct';
}
like "404050506060", $rx1_, 'Loaded regexp works';
my $rx2_ = Load($yaml2);
is ref($rx2_), 'Classy', 'Can Load a blessed regexp';
SKIP: { perl514;
is $rx2_, '(?-xism:99999)', 'Loaded blessed regexp value is correct';
}
ok "999999999" =~ $rx2_, 'Loaded blessed regexp works';
my $rx3_ = Load($yaml3);
is ref($rx3_), 'Regexp', 'Can Load a regexp with flags';
SKIP: { perl514;
is $rx3_, '(?mi-xs:^edcba)', 'Loaded regexp with flags value is correct';
}
like "foo\neDcBA\n", $rx3_, 'Loaded regexp with flags works';
my $rx4_ = Load("--- !!perl/regexp (?msix:123)\n");
is ref($rx4_), 'Regexp', 'Can Load a regexp with all flags';
SKIP: { perl514;
is $rx4_, '(?msix:123)', 'Loaded regexp with all flags value is correct';
}
my $rx5_ = Load("--- !!perl/regexp (?msix:\xC4\x80)\n");
is ref($rx5_), 'Regexp', 'Can Load a unicode regexp';
SKIP: { perl514;
is $rx5_, "(?msix:\x{100})", 'Loaded unicode regexp value is correct';
}
my $rx6 = Load("--- !!perl/regexp foo\n");
my $rx6_yaml = Dump $rx6;
$rx6 = Load($rx6_yaml);
my $rx6_yaml2 = Dump Load Dump $rx6;
cmp_ok($rx6_yaml2, 'eq', $rx6_yaml, "Regex roundtrip ok");
| Name | Type | Size | Permission | Actions |
|---|---|---|---|---|
| data | Folder | 0755 |
|
|
| oop | Folder | 0755 |
|
|
| 000-require-modules.t | File | 274 B | 0644 |
|
| TestYAML.pm | File | 153 B | 0644 |
|
| TestYAMLTests.pm | File | 2.73 KB | 0644 |
|
| alias.t | File | 2.02 KB | 0644 |
|
| api.t | File | 1.49 KB | 0644 |
|
| ascii.t | File | 869 B | 0644 |
|
| author-pod-syntax.t | File | 300 B | 0644 |
|
| binary.t | File | 379 B | 0644 |
|
| blessed.t | File | 1.98 KB | 0644 |
|
| boolean-boolean.t | File | 781 B | 0644 |
|
| boolean-invalid.t | File | 1013 B | 0644 |
|
| boolean-jsonpp.t | File | 765 B | 0644 |
|
| boolean.t | File | 1.28 KB | 0644 |
|
| bug-pvf.t | File | 231 B | 0644 |
|
| bug-stack.t | File | 258 B | 0644 |
|
| code.t | File | 1.47 KB | 0644 |
|
| dump-heuristics.t | File | 265 B | 0644 |
|
| dump-int.t | File | 945 B | 0644 |
|
| dump.t | File | 227 B | 0644 |
|
| duplicate-keys.t | File | 507 B | 0644 |
|
| empty.t | File | 738 B | 0644 |
|
| empty.yaml | File | 0 B | 0644 |
|
| error.t | File | 1.48 KB | 0644 |
|
| file.t | File | 852 B | 0644 |
|
| glob.t | File | 665 B | 0644 |
|
| indent.t | File | 334 B | 0644 |
|
| io-handle.t | File | 1.36 KB | 0644 |
|
| leak.t | File | 1 KB | 0644 |
|
| libyaml-version.t | File | 248 B | 0644 |
|
| load-blessed.t | File | 1.7 KB | 0644 |
|
| load.t | File | 230 B | 0644 |
|
| load_standard_tags.t | File | 1.32 KB | 0644 |
|
| loadfile-empty.t | File | 171 B | 0644 |
|
| long_plain_wrap.t | File | 421 B | 0644 |
|
| magic.t | File | 280 B | 0644 |
|
| native.t | File | 348 B | 0644 |
|
| null.t | File | 831 B | 0644 |
|
| numbers.t | File | 1.07 KB | 0644 |
|
| path-class.t | File | 544 B | 0644 |
|
| pl_sv_undef.t | File | 397 B | 0644 |
|
| private.t | File | 474 B | 0644 |
|
| quote.t | File | 538 B | 0644 |
|
| ref-scalar.t | File | 985 B | 0644 |
|
| regexp.t | File | 2.27 KB | 0644 |
|
| string_nulls.t | File | 239 B | 0644 |
|
| tags.t | File | 554 B | 0644 |
|
| tied.t | File | 2.14 KB | 0644 |
|
| utf8.t | File | 1.53 KB | 0644 |
|
| yaml_tests.yaml | File | 55 B | 0644 |
|