From: Darren Chamberlain Date: Mon, 20 Oct 2003 11:50:38 +0000 (+0000) Subject: Bring tests to passing. X-Git-Tag: v0.04~39 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=3b80481c5fcff354cce5fbbaf73be5a05d821f82;p=dbsrgits%2FSQL-Translator.git Bring tests to passing. --- diff --git a/lib/SQL/Translator/Producer/XML/SQLFairy.pm b/lib/SQL/Translator/Producer/XML/SQLFairy.pm index 0ffe59e..d13a665 100644 --- a/lib/SQL/Translator/Producer/XML/SQLFairy.pm +++ b/lib/SQL/Translator/Producer/XML/SQLFairy.pm @@ -1,7 +1,7 @@ package SQL::Translator::Producer::XML::SQLFairy; # ------------------------------------------------------------------- -# $Id: SQLFairy.pm,v 1.5 2003-10-17 13:39:01 grommit Exp $ +# $Id: SQLFairy.pm,v 1.6 2003-10-20 11:50:38 dlc Exp $ # ------------------------------------------------------------------- # Copyright (C) 2003 Ken Y. Clark , # darren chamberlain , @@ -78,7 +78,7 @@ Creates XML output of a schema. use strict; use vars qw[ $VERSION @EXPORT_OK ]; -$VERSION = sprintf "%d.%02d", q$Revision: 1.5 $ =~ /(\d+)\.(\d+)/; +$VERSION = sprintf "%d.%02d", q$Revision: 1.6 $ =~ /(\d+)\.(\d+)/; use Exporter; use base qw(Exporter); @@ -221,7 +221,7 @@ sub xml_objAttr { my ($xml, $obj, @methods) = @_; my $emit_empty = $PArgs->{'emit_empty_tags'}; - for my $method ( @methods ) { + for my $method ( sort @methods ) { my $val = $obj->$method; debug " ".ref($obj)."->$method=", (defined $val ? "'$val'" : ""); diff --git a/t/17sqlfxml-producer.t b/t/17sqlfxml-producer.t index 78dd983..c4bac65 100644 --- a/t/17sqlfxml-producer.t +++ b/t/17sqlfxml-producer.t @@ -46,57 +46,57 @@ my ($obj,$ans,$xml); $ans = < - + Basic 1 - id + comment on id field integer 1 - 1 - 0 0 + 0 + 1 + id 1 10 - comment on id field - title + varchar hello 0 - 0 - 0 0 + 0 + 0 + title 2 100 - - description + text 0 - 0 - 1 0 + 1 + 0 + description 3 65535 - - email + varchar 0 - 0 - 1 0 + 1 + 0 + email 4 255 - @@ -114,9 +114,9 @@ $ans = <id - + PRIMARY KEY @@ -126,9 +126,9 @@ $ans = <email - + UNIQUE @@ -158,59 +158,59 @@ eq_or_diff $xml, $ans ,"XML looks right"; $ans = < - + Basic 2 - id + comment on id field integer 1 - 1 - 0 0 + 0 + 1 + id 5 10 - comment on id field - title + varchar hello 0 - 0 - 0 0 + 0 + 0 + title 6 100 - - description + text 0 - 0 - 1 0 + 1 + 0 + description 7 65535 - - email + varchar 0 - 0 - 1 0 + 1 + 0 + email 8 255 - @@ -228,9 +228,9 @@ $ans = <id - + PRIMARY KEY @@ -241,9 +241,9 @@ $ans = <email - + UNIQUE @@ -280,17 +280,17 @@ $ans = < - - - - + + + + - - + +