=Test for Data::Dumper::Sortkeys incompatibility (export DATA_DUMPER_TEST=1).
[dbsrgits/DBIx-Class.git] / t / 26dumper.t
1 use strict;
2 use Test::More;
3 use IO::File;
4
5 use Data::Dumper;
6 $Data::Dumper::Sortkeys = 1;
7
8 use lib qw(t/lib);
9
10 BEGIN {
11     eval "use DBD::SQLite";
12     plan $ENV{DATA_DUMPER_TEST}
13         ? ( tests => 3 )
14         : ( skip_all => 'Set $ENV{DATA_DUMPER_TEST} to run this test' );
15 }
16
17
18 use_ok('DBICTest');
19 use_ok('DBICTest::HelperRels');
20
21
22 my $rs = DBICTest::CD->search(
23            { 'artist.name' => 'We Are Goth',
24              'liner_notes.notes' => 'Kill Yourself!' },
25            { join => [ qw/artist liner_notes/ ] });
26
27 Dumper($rs);
28
29 $rs = DBICTest::CD->search(
30            { 'artist.name' => 'We Are Goth',
31              'liner_notes.notes' => 'Kill Yourself!' },
32            { join => [ qw/artist liner_notes/ ] });
33
34 cmp_ok( $rs + 0, '==', 1, "Single record in after death with dumper");
35
36 1;