From: Rafael Kitover Date: Mon, 25 Jul 2011 19:28:28 +0000 (-0400) Subject: fucking pigs broke my Win32 perl X-Git-Tag: 0.07011~61 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=8fc55df0ce3bcd9fbcb73db7d3c8ec3f7b9b1b4d;p=dbsrgits%2FDBIx-Class-Schema-Loader.git fucking pigs broke my Win32 perl The fucking pigs did something to my Win32 perl so that command line args with special characters like [] and {} are not parsed correctly. This problem does not show up for CPAN testers running these tests, t/23dumpmore.t and t/26dump_use_moose.t . This commit adds a check for refs in loader options or connect_info in the t/lib/dbixcsl_dumper_tests.pm test lib, and skips tests on Win32 if the FUCKING_PIGS environment variable is set. --- diff --git a/t/lib/dbixcsl_dumper_tests.pm b/t/lib/dbixcsl_dumper_tests.pm index 1ee720a..32bf28c 100644 --- a/t/lib/dbixcsl_dumper_tests.pm +++ b/t/lib/dbixcsl_dumper_tests.pm @@ -5,12 +5,15 @@ use Test::More; use File::Path; use IPC::Open3; use IO::Handle; +use List::MoreUtils 'any'; use DBIx::Class::Schema::Loader::Utils 'dumper_squashed'; use DBIx::Class::Schema::Loader (); +use namespace::clean; -use dbixcsl_test_dir qw/$tdir/; +use dbixcsl_test_dir '$tdir'; my $DUMP_PATH = "$tdir/dump"; + sub cleanup { rmtree($DUMP_PATH, 1, 1); } @@ -31,7 +34,14 @@ sub dump_test { $tdata{options}{dump_directory} = $DUMP_PATH; $tdata{options}{use_namespaces} ||= 0; - for my $dumper (\&_dump_directly, \&_dump_dbicdump) { + SKIP: for my $dumper (\&_dump_directly, \&_dump_dbicdump) { + skip 'fucking pigs broke my Win32 perl', 1, + if $dumper == \&_dump_dbicdump + && $^O eq 'MSWin32' + && $ENV{FUCKING_PIGS} + && ( (any { ref $_ } values %{ $tdata{options} }) + || any { ref $_ } _get_connect_info(\%tdata)); + _test_dumps(\%tdata, $dumper->(%tdata)); } }