File: TestYAML.pm

package info (click to toggle)
libyaml-syck-perl 1.20-1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 932 kB
  • sloc: ansic: 3,987; perl: 3,387; makefile: 4
file content (31 lines) | stat: -rw-r--r-- 490 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
package t::TestYAML;

BEGIN { $ENV{PERL_DL_NONLAZY} = 0 }

use strict;
use Test::More;
use YAML::Syck;

sub import {
    shift;
    @_ or return;
    plan @_;

    *::ok = *ok;
    *::is = *is;
    *::roundtrip = *roundtrip;
    *::Dump = *YAML::Syck::Dump;
    *::Load = *YAML::Syck::Load;
}

sub roundtrip {
    @_ = (YAML::Syck::Load(YAML::Syck::Dump($_[0])), $_[0]);
    goto &main::is;
}

1;

#use Test::YAML 0.51 -Base;
#
#$Test::YAML::YAML = 'YAML::Syck';
#Test::YAML->load_yaml_pm;