From: Dagfinn Ilmari Mannsåker Date: Thu, 25 Sep 2014 13:10:15 +0000 (+0100) Subject: Fix undef warnings from Text::ParseWords when running tests with -w X-Git-Tag: v0.11021~24 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=7e212236d2058cd89f78321f416fb9a27e4257ec;p=dbsrgits%2FSQL-Translator.git Fix undef warnings from Text::ParseWords when running tests with -w --- diff --git a/t/09sqlt-diagram.t b/t/09sqlt-diagram.t index 53de678..85d5598 100644 --- a/t/09sqlt-diagram.t +++ b/t/09sqlt-diagram.t @@ -26,7 +26,7 @@ my $test_data = catfile($Bin, @data); my $tmp = mktemp('sqlXXXXX'); ok(-e $sqlt_diagram); -my @cmd = ($^X, shellwords($ENV{HARNESS_PERL_SWITCHES}), $sqlt_diagram, "-d", "MySQL", "-o", $tmp, $test_data); +my @cmd = ($^X, shellwords($ENV{HARNESS_PERL_SWITCHES}||''), $sqlt_diagram, "-d", "MySQL", "-o", $tmp, $test_data); eval { system(@cmd); }; ok(!$@ && ($? == 0)); ok(-e $tmp); diff --git a/t/31dumper.t b/t/31dumper.t index 96401ca..927c82d 100644 --- a/t/31dumper.t +++ b/t/31dumper.t @@ -52,7 +52,7 @@ print $fh $output; close $fh or die "Can't close file '$filename': $!"; my $out; -my $pid = open3( undef, $out, undef, $^X, shellwords($ENV{HARNESS_PERL_SWITCHES}), '-cw', $filename ); +my $pid = open3( undef, $out, undef, $^X, shellwords($ENV{HARNESS_PERL_SWITCHES}||''), '-cw', $filename ); my $res = do { local $/; <$out> }; waitpid($pid, 0); diff --git a/t/70sqlt-diff_script.t b/t/70sqlt-diff_script.t index 13ee198..14962aa 100644 --- a/t/70sqlt-diff_script.t +++ b/t/70sqlt-diff_script.t @@ -70,7 +70,7 @@ like($out, qr/No differences found/, "Properly detected no differences"); sub _run_cmd { my $out; - my $pid = open3( undef, $out, undef, $^X, shellwords($ENV{HARNESS_PERL_SWITCHES}), @_ ); + my $pid = open3( undef, $out, undef, $^X, shellwords($ENV{HARNESS_PERL_SWITCHES}||''), @_ ); my $res = do { local $/; <$out> }; waitpid($pid, 0); $res; diff --git a/t/70sqlt-diff_script_old.t b/t/70sqlt-diff_script_old.t index 1ebd2f0..de079b0 100644 --- a/t/70sqlt-diff_script_old.t +++ b/t/70sqlt-diff_script_old.t @@ -97,7 +97,7 @@ like($out, qr/ALTER TABLE TABLE1 ADD CONSTRAINT/, sub _run_cmd { my $out; - my $pid = open3( undef, $out, undef, $^X, shellwords($ENV{HARNESS_PERL_SWITCHES}), @_ ); + my $pid = open3( undef, $out, undef, $^X, shellwords($ENV{HARNESS_PERL_SWITCHES}||''), @_ ); my $res = do { local $/; <$out> }; waitpid($pid, 0); $res;