-
Notifications
You must be signed in to change notification settings - Fork 580
[PATCH] eol.t: Don't test for CR as line separator as that is deprecated #11469
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
From [email protected]This is a bug report for perl from marcgreen@wpi.edu, lib/Pod/t/eol.t | 28 +++++----------------------- Inline Patchdiff --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~~");
}
--
Flags: 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: Locally applied patches: @INC for perl 5.14.0: Environment for perl 5.14.0: |
From @cpansproutOn Thu Jun 30 18:43:16 2011, marcgreen@WPI.EDU wrote:
Even if something is deprecated, but still supported, shouldn’t we |
The RT System itself - Status changed from 'new' to 'open' |
From [email protected]
|
From @cpansproutOn Sun Jul 03 14:41:27 2011, ponguile@gmail.com wrote:
Then how are the tests currently passing? I’m confused. |
From [email protected]______________________________________ On Sun Jul 03 14:41:27 2011, ponguile@gmail.com wrote:
The tests use Pod::Html which *does* technically support '\r' as a line separator -- it does a global s/\r/\n/ -- but pjcj enlightened me that that behavior is no longer supported (see below). Note that I am currently refactoring Pod::Html and it no longer will support \r as a line separator. Jun 30 18:42:37 <marcg> a question about lib/Pod/t/eol.t: why should '\r' be treated as a newline? |
From @cpansproutOn Mon Jul 04 06:25:49 2011, marcgreen@WPI.EDU wrote:
Oh no, not this again. :-( The ability to run perl on a platform that uses \r as its default line Furthermore, there are still Mac OS X programs that use \r as the line So, no, I do not think Pod::Html should drop support for it. Why does it |
@cpansprout - Status changed from 'open' to 'rejected' |
Migrated from rt.perl.org#93878 (status was 'rejected')
Searchable as RT93878$
The text was updated successfully, but these errors were encountered: