File: 06-anydump.t

package info (click to toggle)
libscriptalicious-perl 1.15-1
  • links: PTS, VCS
  • area: main
  • in suites: lenny
  • size: 180 kB
  • ctags: 70
  • sloc: perl: 1,150; makefile: 16
file content (27 lines) | stat: -rw-r--r-- 561 bytes parent folder | download | duplicates (5)
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
#  -*- perl -*-

use strict;
use warnings;

use Test::More tests => 2;

use Scriptalicious;

$ENV{PERL5LIB} = join ":", "lib", split ":", ($ENV{PERL5LIB} || "");

SKIP: {
    eval 'use YAML';
    if ( $@ ) {
	skip "YAML not installed",1;
    }
    my $output = capture($^X, "t/dump.pl");
    is($output, "Hello: world", "YAML anydump");
}

$ENV{PERL5LIB} = join ":", "t/missing", split ":", ($ENV{PERL5LIB} || "");
delete $ENV{PERL5OPT};

my $output = capture($^X, "t/dump.pl");
is($output, q{$x = {
       'Hello' => 'world'
     };}, "Data::Dumper anydump");