[Mono-bugs] [Bug 51020][Wis] New - StringReader.ReadLine does not work when string has both \r and \n as line seperators
bugzilla-daemon@bugzilla.ximian.com
bugzilla-daemon@bugzilla.ximian.com
Fri, 14 Nov 2003 23:31:21 -0500 (EST)
Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.
Changed by bmaurer@users.sf.net.
http://bugzilla.ximian.com/show_bug.cgi?id=51020
--- shadow/51020 2003-11-14 23:31:21.000000000 -0500
+++ shadow/51020.tmp.15675 2003-11-14 23:31:21.000000000 -0500
@@ -0,0 +1,47 @@
+Bug#: 51020
+Product: Mono/Class Libraries
+Version: unspecified
+OS:
+OS Details:
+Status: NEW
+Resolution:
+Severity: Unknown
+Priority: Wishlist
+Component: CORLIB
+AssignedTo: mono-bugs@ximian.com
+ReportedBy: bmaurer@users.sf.net
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: StringReader.ReadLine does not work when string has both \r and \n as line seperators
+
+Description of Problem:
+StringReader.ReadLine seems a bit borked...
+
+Steps to reproduce the problem:
+using System;
+using System.IO;
+
+class Foo {
+ static void Main ()
+ {
+ TextReader tr = new StringReader ("There she was just a walking\nDown the
+street singin'\rDo wah diddy diddy dum diddy do");
+ int i = 0;
+ string s;
+ while ((s = tr.ReadLine ()) != null)
+ Console.WriteLine ("{0}: {1}", ++i, s);
+ }
+}
+
+Actual Results:
+1: There she was just a walking
+Down the street singin'
+2: Do wah diddy diddy dum diddy do
+
+
+Expected Results:
+1: There she was just a walking
+2: Down the street singin'
+3: Do wah diddy diddy dum diddy do