From: Mark Addison Date: Wed, 8 Jun 2005 14:48:07 +0000 (+0000) Subject: Added test for mysql_table_type. Removed dodgey testing code so test works for everyo... X-Git-Tag: v0.11008~550 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=819fe9ef8120750aa8168ccc33cc7a3509fc2e70;p=dbsrgits%2FSQL-Translator.git Added test for mysql_table_type. Removed dodgey testing code so test works for everyone else. --- diff --git a/t/38-mysql-producer.t b/t/38-mysql-producer.t index a6ed999..4693c29 100644 --- a/t/38-mysql-producer.t +++ b/t/38-mysql-producer.t @@ -1,4 +1,4 @@ -#!/usr/bin/perl -w +#!/usr/bin/perl -w # vim:filetype=perl # @@ -37,6 +37,7 @@ schema: thing: name: thing extra: + mysql_table_type: InnoDB mysql_charset: latin1 mysql_collate: latin1_danish_ci order: 1 @@ -70,7 +71,7 @@ CREATE TABLE thing ( name varchar(32), swedish_name varchar(32) CHARACTER SET swe7, description text CHARACTER SET utf8 COLLATE utf8_general_ci -) DEFAULT CHARACTER SET latin1 COLLATE latin1_danish_ci; +) Type=InnoDB DEFAULT CHARACTER SET latin1 COLLATE latin1_danish_ci; EOSQL @@ -82,19 +83,8 @@ EOSQL to => "MySQL", ); - my $out; - $yaml_in = do { - local $/ = undef; - open(FILE, "/home/grommit/src/sqlfairy/test.yml") or die "$!"; - - }; - $mysql_out = do { - local $/ = undef; - open(FILE, "/home/grommit/src/sqlfairy/test.sql") or die "$!"; - - }; - - $out = $sqlt->translate(\$yaml_in) or die "Translate error:".$sqlt->error; + my $out = $sqlt->translate(\$yaml_in) + or die "Translate error:".$sqlt->error; ok $out ne "" ,"Produced something!"; eq_or_diff $out, $mysql_out ,"Output looks right"; }