Skip to content

Commit 3175c97

Browse files
committed
TESTrun: Fix typos in the Windows code path
The typos were "\" instead of "\\" (second 'fc' command). Moreover: Use more File::Spec->canonpath() with 'newdir' and 'diffdir' variables.
1 parent d0defdf commit 3175c97

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

tests/TESTrun

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,9 @@ sub runtest {
225225
#
226226
if ($^O eq 'MSWin32') {
227227
my $winoutput = File::Spec->canonpath($output);
228-
$r = system "fc /lb1000 /t /1 $winoutput tests\\NEW\\$outputbase >tests\\DIFF\\$outputbase.diff";
228+
my $winnewdir = File::Spec->canonpath($newdir);
229+
my $windiffdir = File::Spec->canonpath($diffdir);
230+
$r = system "fc /lb1000 /t /1 $winoutput ${winnewdir}\\$outputbase >${windiffdir}\\$outputbase.diff";
229231
$diffstat = $r >> 8;
230232
} else {
231233
$r = system "diff $diff_flags $output ${newdir}/$outputbase >${diffdir}/$outputbase.diff";
@@ -257,8 +259,9 @@ sub runtest {
257259
#
258260
if ($^O eq 'MSWin32') {
259261
my $winoutput = File::Spec->canonpath($output);
262+
my $windiffdir = File::Spec->canonpath($diffdir);
260263
my $canonstderrlog = File::Spec->canonpath($stderrlog);
261-
$nr = system "fc /lb1000 /t /1 $winoutput.stderr $canonstderrlog >tests\DIFF\$outputbase.stderr.diff";
264+
$nr = system "fc /lb1000 /t /1 $winoutput.stderr $canonstderrlog >${windiffdir}\\$outputbase.stderr.diff";
262265
$errdiffstat = $nr >> 8;
263266
} else {
264267
$nr = system "diff $output.stderr $stderrlog >${diffdir}/$outputbase.stderr.diff";
@@ -299,7 +302,8 @@ sub runtest {
299302
# XXX - just do this directly in Perl?
300303
#
301304
if ($^O eq 'MSWin32') {
302-
system "type tests\\DIFF\\$outputbase.diff >> tests\\failure-outputs.txt";
305+
my $windiffdir = File::Spec->canonpath($diffdir);
306+
system "type ${windiffdir}\\$outputbase.diff >> tests\\failure-outputs.txt";
303307
} else {
304308
system "cat ${diffdir}/$outputbase.diff >> tests/failure-outputs.txt";
305309
}

0 commit comments

Comments
 (0)