- Lukas Thiemeier <lukast@cpan.org>
- Mark Addison <grommit@users.sourceforge.net>
- Maximilian Gass <mxey@cloudconnected.org>
+- H.Merijn Brand <h.m.brand@xs4all.nl>
- Michal Jurosz <mj@mj41.cz>
- Mikey Melillo <mmelillo@users.sourceforge.net>
- Moritz Onken <onken@netcubed.de>
* Fix Diagram Producer POD (RT#71397, RT#71398)
* Fix Diagram Producer to use correct binmode on output (RT#71399)
* Fix ignored option to script/sqlt-diagram (RT#5992)
+* Fix t/17sqlfxml-producer.t failures due to whitespace differences introduced by
+ environment config snippets (RT#70786)
# ----------------------------------------------------------
# 0.11010 2011-10-05
use SQL::Translator;
use SQL::Translator::Producer::XML::SQLFairy;
+# Due to formatters being able to change style, e.g. by entries in .rc files
+# in $HOME, the layout and or indent might differ slightly. As leading white
+# is not important in XML, strip it when comparing
+sub xml_equals
+{
+ my ($got, $expect, $msg) = (@_, "XML looks right");
+ $got =~ s/^ +//gm;
+ $expect =~ s/^ +//gm;
+ eq_or_diff $got, $expect, $msg;
+}
+
#
# basic stuff
#
print "XML:\n$xml" if DEBUG;
# Strip sqlf header with its variable date so we diff safely
$xml =~ s/^([^\n]*\n){7}//m;
-eq_or_diff $xml, $ans, "XML looks right";
+xml_equals $xml, $ans;
} # end basic stuff
print "XML attrib_values=>1:\n$xml" if DEBUG;
# Strip sqlf header with its variable date so we diff safely
$xml =~ s/^([^\n]*\n){7}//m;
- eq_or_diff $xml, $ans ,"XML looks right";
+ xml_equals $xml, $ans;
} # end View
#
print "XML attrib_values=>1:\n$xml" if DEBUG;
# Strip sqlf header with its variable date so we diff safely
$xml =~ s/^([^\n]*\n){7}//m;
- eq_or_diff $xml, $ans ,"XML looks right";
+ xml_equals $xml, $ans;
} # end Trigger
#
print "XML attrib_values=>1:\n$xml" if DEBUG;
# Strip sqlf header with its variable date so we diff safely
$xml =~ s/^([^\n]*\n){7}//m;
- eq_or_diff $xml, $ans ,"XML looks right";
+ xml_equals $xml, $ans;
} # end Procedure
#
print "XML:\n$xml" if DEBUG;
# Strip sqlf header with its variable date so we diff safely
$xml =~ s/^([^\n]*\n){7}//m;
- eq_or_diff $xml, $ans ,"XML looks right";
+ xml_equals $xml, $ans;
} # end extra