Front page | perl.perl5.porters |
Postings from July 2011
[perl #93878] [PATCH] eol.t: Don't test for CR as line separator as that is deprecated
Thread Previous
From:
Green, Marc Evan
Date:
July 1, 2011 01:59
Subject:
[perl #93878] [PATCH] eol.t: Don't test for CR as line separator as that is deprecated
Message ID:
rt-3.6.HEAD-16080-1309484596-1938.93878-75-0@perl.org
# New Ticket Created by "Green, Marc Evan"
# Please include the string: [perl #93878]
# in the subject line of all future correspondence about this issue.
# <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=93878 >
This is a bug report for perl from marcgreen@wpi.edu,
generated with the help of perlbug 1.39 running under perl 5.14.0.
---
lib/Pod/t/eol.t | 28 +++++-----------------------
1 files changed, 5 insertions(+), 23 deletions(-)
diff --git a/lib/Pod/t/eol.t b/lib/Pod/t/eol.t
index 987c150..2a401cb 100644
--- a/lib/Pod/t/eol.t
+++ b/lib/Pod/t/eol.t
@@ -1,6 +1,6 @@
#!./perl -w
-use Test::More tests => 3;
+use Test::More tests => 1;
open(POD, ">$$.pod") or die "$$.pod: $!";
print POD <<__EOF__;
@@ -32,19 +32,6 @@ close(POD);
use Pod::Html;
-# --- CR ---
-
-open(POD, "<$$.pod") or die "$$.pod: $!";
-open(IN, ">$$.in") or die "$$.in: $!";
-while (<POD>) {
- s/[\r\n]+/\r/g;
- print IN $_;
-}
-close(POD);
-close(IN);
-
-pod2html("--title=eol", "--infile=$$.in", "--outfile=$$.o1");
-
# --- LF ---
open(POD, "<$$.pod") or die "$$.pod: $!";
@@ -56,7 +43,7 @@ while (<POD>) {
close(POD);
close(IN);
-pod2html("--title=eol", "--infile=$$.in", "--outfile=$$.o2");
+pod2html("--title=eol", "--infile=$$.in", "--outfile=$$.o1");
# --- CRLF ---
@@ -69,7 +56,7 @@ while (<POD>) {
close(POD);
close(IN);
-pod2html("--title=eol", "--infile=$$.in", "--outfile=$$.o3");
+pod2html("--title=eol", "--infile=$$.in", "--outfile=$$.o2");
# --- now test ---
@@ -81,15 +68,10 @@ my $cksum1 = unpack("%32C*", <IN>);
open(IN, "<$$.o2") or die "$$.o2: $!";
my $cksum2 = unpack("%32C*", <IN>);
-open(IN, "<$$.o3") or die "$$.o3: $!";
-my $cksum3 = unpack("%32C*", <IN>);
-
-ok($cksum1 == $cksum2, "CR vs LF");
-ok($cksum1 == $cksum3, "CR vs CRLF");
-ok($cksum2 == $cksum3, "LF vs CRLF");
+ok($cksum1 == $cksum2, "LF vs CRLF");
close IN;
END {
- 1 while unlink("$$.pod", "$$.in", "$$.o1", "$$.o2", "$$.o3",
+ 1 while unlink("$$.pod", "$$.in", "$$.o1", "$$.o2",
"pod2htmd.x~~", "pod2htmi.x~~");
}
--
1.7.0.4
---
Flags:
category=library
severity=low
module=Pod::Html
---
Site configuration information for perl 5.14.0:
Configured by marc at Fri Jun 3 17:13:58 EDT 2011.
Summary of my perl5 (revision 5 version 14 subversion 0) configuration:
Platform:
osname=linux, osvers=2.6.32-32-generic, archname=i686-linux
uname='linux cubone 2.6.32-32-generic #62-ubuntu smp wed apr 20 21:54:21 utc 2011 i686 gnulinux '
config_args='-de -Dprefix=/home/marc/perl5/perlbrew/perls/perl-5.14.0'
hint=recommended, useposix=true, d_sigaction=define
useithreads=undef, usemultiplicity=undef
useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef
use64bitint=undef, use64bitall=undef, uselongdouble=undef
usemymalloc=n, bincompat5005=undef
Compiler:
cc='cc', ccflags ='-fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
optimize='-O2',
cppflags='-fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include'
ccversion='', gccversion='4.4.3', gccosandvers=''
intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
alignbytes=4, prototype=define
Linker and Libraries:
ld='cc', ldflags =' -fstack-protector -L/usr/local/lib'
libpth=/usr/local/lib /lib/../lib /usr/lib/../lib /lib /usr/lib /usr/lib/i486-linux-gnu /usr/lib64
libs=-lnsl -ldl -lm -lcrypt -lutil -lc
perllibs=-lnsl -ldl -lm -lcrypt -lutil -lc
libc=/lib/libc-2.11.1.so, so=so, useshrplib=false, libperl=libperl.a
gnulibc_version='2.11.1'
Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E'
cccdlflags='-fPIC', lddlflags='-shared -O2 -L/usr/local/lib -fstack-protector'
Locally applied patches:
---
@INC for perl 5.14.0:
/home/marc/perl5/perlbrew/perls/perl-5.14.0/lib/site_perl/5.14.0/i686-linux
/home/marc/perl5/perlbrew/perls/perl-5.14.0/lib/site_perl/5.14.0
/home/marc/perl5/perlbrew/perls/perl-5.14.0/lib/5.14.0/i686-linux
/home/marc/perl5/perlbrew/perls/perl-5.14.0/lib/5.14.0
.
---
Environment for perl 5.14.0:
HOME=/home/marc
LANG=en_US.utf8
LANGUAGE (unset)
LD_LIBRARY_PATH (unset)
LOGDIR (unset)
PATH=/home/marc/perl5/perlbrew/bin:/home/marc/perl5/perlbrew/perls/perl-5.14.0/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
PERLBREW_HOME=/home/marc/.perlbrew
PERLBREW_PATH=/home/marc/perl5/perlbrew/bin:/home/marc/perl5/perlbrew/perls/perl-5.14.0/bin
PERLBREW_PERL=perl-5.14.0
PERLBREW_ROOT=/home/marc/perl5/perlbrew
PERLBREW_VERSION=0.23
PERL_BADLANG (unset)
SHELL=/bin/bash
Thread Previous