From: Ken Youens-Clark Date: Fri, 22 Aug 2003 22:21:52 +0000 (+0000) Subject: Changes to quit using "SqlfXML." X-Git-Tag: v0.04~234 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=2e11379ef0451e54acca5dee655b0c33272008ed;hp=42412377cfe19192a4f7f8a4af7e316bb942df1f;p=dbsrgits%2FSQL-Translator.git Changes to quit using "SqlfXML." --- diff --git a/t/16xml-parser.t b/t/16xml-parser.t index b9fa08f..ebf3323 100644 --- a/t/16xml-parser.t +++ b/t/16xml-parser.t @@ -10,12 +10,13 @@ # Tests that; # +use strict; use Test::More; use Test::Exception; use strict; use Data::Dumper; -our %opt; +my %opt; BEGIN { map { $opt{$_}=1 if s/^-// } @ARGV; } use constant DEBUG => (exists $opt{d} ? 1 : 0); local $SIG{__WARN__} = sub { diag "[warn] ", @_; }; @@ -25,7 +26,7 @@ use FindBin qw/$Bin/; # Usefull test subs for the schema objs #============================================================================= -our %ATTRIBUTES; +my %ATTRIBUTES; $ATTRIBUTES{field} = [qw/ name data_type @@ -82,7 +83,7 @@ foreach ( sub do_file { my $testschema = shift; # Parse the test XML schema - our $obj; + my $obj; $obj = SQL::Translator->new( debug => DEBUG, show_warnings => 1, @@ -90,8 +91,8 @@ sub do_file { ); die "Can't find test schema $testschema" unless -e $testschema; my $sql = $obj->translate( - from => "SqlfXML", - to =>"MySQL", + from => 'XML-SQLFairy', + to => 'MySQL', filename => $testschema, ); print $sql if DEBUG; diff --git a/t/17sqlfxml-producer.t b/t/17sqlfxml-producer.t index bc6acde..1a7ced0 100644 --- a/t/17sqlfxml-producer.t +++ b/t/17sqlfxml-producer.t @@ -11,7 +11,7 @@ use Test::More; use Test::Exception; use Data::Dumper; -our %opt; +my %opt; BEGIN { map { $opt{$_}=1 if s/^-// } @ARGV; } use constant DEBUG => (exists $opt{d} ? 1 : 0); use constant TRACE => (exists $opt{t} ? 1 : 0); @@ -267,7 +267,7 @@ eq_or_diff $xml, $ans ,"XML looks right"; # show_warnings => 1, # add_drop_table => 1, # from => "MySQL", -# to => "SqlfXML", +# to => "XML-SQLFairy", # producer_args => { attrib_values => 1 }, # ); # print $obj->translate($file); diff --git a/t/18ttschema-producer.t b/t/18ttschema-producer.t index 53e6457..afe5025 100644 --- a/t/18ttschema-producer.t +++ b/t/18ttschema-producer.t @@ -4,11 +4,13 @@ # Before `make install' is performed this script should be runnable with # `make test'. After `make install' it should work as `perl test.pl' +use strict; use Test::More; use Test::Exception; use Data::Dumper; -BEGIN { our %opt; map { $opt{$_}=1 if s/^-// } @ARGV; } +use vars '%opt'; +BEGIN { map { $opt{$_}=1 if s/^-// } @ARGV; } use constant DEBUG => (exists $opt{d} ? 1 : 0); local $SIG{__WARN__} = sub { diag "[warn] ", @_; }; @@ -32,12 +34,12 @@ use SQL::Translator; use SQL::Translator::Producer::TTSchema; # Parse the test XML schema -our $obj; +my $obj; $obj = SQL::Translator->new( debug => DEBUG, #$opt{d}, show_warnings => 1, add_drop_table => 1, - from => "SqlfXML", + from => "XML-SQLFairy", filename => "$Bin/data/xml/schema-basic.xml", to => "TTSchema", producer_args => {