From: Paul Ramsey Date: Thu, 31 May 2012 22:16:02 +0000 (+0000) Subject: Works for MinGW now X-Git-Tag: 2.1.0beta2~947 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5b691ebbf961f85c727f33e2696697b70ad27c7b;p=postgis Works for MinGW now git-svn-id: http://svn.osgeo.org/postgis/trunk@9846 b70326c6-7e19-0410-871a-916f4a2858ee --- diff --git a/regress/run_test.pl b/regress/run_test.pl index 5361f058d..1b2c1ff76 100755 --- a/regress/run_test.pl +++ b/regress/run_test.pl @@ -4,8 +4,7 @@ use File::Basename; use File::Temp 'tempdir'; #use File::Which; use File::Copy; -use File::Path 'make_path'; -use File::Path 'remove_tree'; +use File::Path; use Cwd 'abs_path'; use Getopt::Long; @@ -324,7 +323,7 @@ print "Failed: $FAIL\n"; if ( $OPT_CLEAN ) { - remove_tree($TMPDIR); + rmtree($TMPDIR); } if ( ! ($OPT_NODROP || $OPT_NOCREATE) ) @@ -528,7 +527,7 @@ sub run_simple_test my $tmpfile = sprintf("%s/test_%s_tmp", $betmpdir, $RUN); my $diffile = sprintf("%s/test_%s_diff", $TMPDIR, $RUN); - make_path($betmpdir); + mkpath($betmpdir); my $cmd = "psql -v \"VERBOSITY=terse\" -v \"tmpfile='$tmpfile'\" -tXA $DB < $sql > $outfile 2>&1"; my $rv = system($cmd); @@ -1173,13 +1172,14 @@ sub diff open(OBT, $obtained_file) || die "Cannot open $obtained_file\n"; open(EXP, $expected_file) || die "Cannot open $expected_file\n"; - $lineno=0; + my $lineno=0; while (!eof(OBT) or !eof(EXP)) { # TODO: check for premature end of one or the other ? - $obtline=; - $expline=; - chop($obtline); chop($expline); - ++$lineno; + my $obtline=; + my $expline=; + $obtline =~ s/(\r\n|\n)$//; + $expline =~ s/(\r\n|\n)$//; + $lineno++; if ( $obtline ne $expline ) { my $diffln .= "$lineno.OBT: $obtline\n"; $diffln .= "$lineno.EXP: $expline\n";