Skip Menu |

This queue is for tickets about the PDF-Create CPAN distribution.

Report information
The Basics
Id: 55505
Status: resolved
Priority: 0/
Queue: PDF-Create

People
Owner: MARKUSB [...] cpan.org
Requestors: MARKUSB [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 1.05
Fixed in: 1.06



Subject: test 09-cgi.t broken on windows
The test 09-cgi.t fails on windows because the path to the test cgi is a hard-coded forward slash '/', which does not work on windows. 't' is not recognized as an internal or external command, operable program or batch file. # Failed test 'CGI executes' # at t/09-cgi.t line 23. # Looks like you failed 1 test of 2. t/09-cgi.t ............ Dubious, test returned 1 (wstat 256, 0x100) Failed 1/2 subtests (less 1 skipped subtest: 0 okay)
Fix proposed by Lorenz: use File::Spec; #^^^^^^^^^^^^^^ BEGIN { unshift @INC, "lib", "../lib" } use strict; use File::Basename; use PDF::Create; use Test::More tests => 2; my $pdfname = $0; $pdfname =~ s/\.t/\.pdf/; my $cginame = File::Spec->catfile(dirname($0) . "/09-cgi-script.pl"); # ^^^^^^^^^^^^^^^^^^^^ ^ # # run the cgi # ok( !system(qq($cginame | perl -n -e "print if \$. > 2" >$pdfname)), "CGI executes" ); # ^^^^ perl statt sed ...