X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F04file%2Cfh%2Cstring.t;h=91214122795074a700f75cdae227dc3016fd2086;hb=c1f9a59d17b44cff47a15a512a2402a3672156ac;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..9121412 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,12 @@ 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! +$_->translator (undef) for ($v1, $v2); + 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");