X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F04file%2Cfh%2Cstring.t;h=7e4d7b0e49b9dbaec127e0048479d70eeb6c84a2;hb=216af0c9198d3865d2b8c04459645ec227762ec4;hp=9f1100baacca9cdf9a71f2b09239b84d16b8caf8;hpb=307d95603a49f1ff8056963822538c726cde481f;p=dbsrgits%2FSQL-Translator.git diff --git a/t/04file,fh,string.t b/t/04file,fh,string.t index 9f1100b..7e4d7b0 100644 --- a/t/04file,fh,string.t +++ b/t/04file,fh,string.t @@ -12,11 +12,9 @@ use strict; use IO::File; -use Storable 'freeze'; use SQL::Translator; use Test::More tests => 3; - # The filename, holder for all the data, and the filehandle my $datafile = "t/data/mysql/Apache-Session-MySQL.sql"; my $data; @@ -27,7 +25,7 @@ my ($v1, $v2); my $tr = SQL::Translator->new; # Pass filename: simplest way $tr->translate($datafile); - $v1 = freeze( $tr->schema ); + $v1 = $tr->schema; } { @@ -35,9 +33,13 @@ my ($v1, $v2); # Pass string reference read($fh, $data, -s $datafile); $tr->translate(\$data); - $v2 = freeze( $tr->schema ); + $v2 = $tr->schema; } +# XXX- Hack to remove Graph hack! +delete $v1->{translator}; +delete $v2->{translator}; + ok(length $v1, "passing string (filename) works"); ok(length $v2, "passing string as SCALAR reference"); -is($v1, $v2, "from file == from string"); +is_deeply($v1, $v2, "from file == from string");