[Bps-public-commit] r17052 - in HTTP-Server-Simple-Recorder: . lib/HTTP/Server/Simple
jesse at bestpractical.com
jesse at bestpractical.com
Fri Nov 28 22:55:24 EST 2008
Author: jesse
Date: Fri Nov 28 22:55:24 2008
New Revision: 17052
Modified:
HTTP-Server-Simple-Recorder/Changes
HTTP-Server-Simple-Recorder/lib/HTTP/Server/Simple/Recorder.pm
HTTP-Server-Simple-Recorder/t/01.live.t
Log:
nsaction: Ticket created by PJF
Queue: HTTP-Server-Simple-Recorder
Subject: [PATCH] 01.live.t fails under Windows due to CRLF issues
Broken in: 0.02
Severity: (no value)
Owner: Nobody
Requestors: PJF at cpan.org
Status: new
Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=41302 >
The t/01.live.t test reads some log files without first setting
binmode() on the filehandles. On Windows systems, this means that CRLF
sequences get turned into just LF characters, which then causes the test
to (erroneously) break when looking for CRLF sequences in the result.
The attached patch fixes this problem.
Modified: HTTP-Server-Simple-Recorder/Changes
==============================================================================
--- HTTP-Server-Simple-Recorder/Changes (original)
+++ HTTP-Server-Simple-Recorder/Changes Fri Nov 28 22:55:24 2008
@@ -1,5 +1,8 @@
Revision history for HTTP-Server-Simple-Recorder
+0.03 Fri Nov 28 22:53:27 EST 2008
+ * win32 binmode oops. fixed by pjf at cpan.org
+
0.02 Thu Oct 20 03:30:37 EDT 2005
Update to work with latest Test::HTTP::Server::Simple.
Modified: HTTP-Server-Simple-Recorder/lib/HTTP/Server/Simple/Recorder.pm
==============================================================================
--- HTTP-Server-Simple-Recorder/lib/HTTP/Server/Simple/Recorder.pm (original)
+++ HTTP-Server-Simple-Recorder/lib/HTTP/Server/Simple/Recorder.pm Fri Nov 28 22:55:24 2008
@@ -1,6 +1,6 @@
package HTTP::Server::Simple::Recorder;
-our $VERSION = '0.02';
+our $VERSION = '0.03';
use warnings;
use strict;
Modified: HTTP-Server-Simple-Recorder/t/01.live.t
==============================================================================
--- HTTP-Server-Simple-Recorder/t/01.live.t (original)
+++ HTTP-Server-Simple-Recorder/t/01.live.t Fri Nov 28 22:55:24 2008
@@ -37,6 +37,8 @@
my $f = "t/logs/rec.1.in";
ok((open my $fh, "<$f"), "found a log file") or diag("error opening $f: $!");
+ binmode($fh);
+
my $text = do { local $/; <$fh> };
is($text, "GET / HTTP/1.1\015\012\015\012");
@@ -46,6 +48,8 @@
my $f = "t/logs/rec.2.in";
ok((open my $fh, "<$f"), "found a log file") or diag("error opening $f: $!");
+ binmode($fh);
+
my $text = do { local $/; <$fh> };
is($text, "GET /monkey HTTP/1.1\015\012\015\012");
More information about the Bps-public-commit
mailing list