public inbox for mauve-discuss@sourceware.org
 help / color / mirror / Atom feed
* Patch: BufferedWriter.Test
@ 2004-07-23  9:29 Jeroen Frijters
  2004-07-23 17:54 ` Thomas Zander
  0 siblings, 1 reply; 2+ messages in thread
From: Jeroen Frijters @ 2004-07-23  9:29 UTC (permalink / raw)
  To: mauve-discuss

[-- Attachment #1: Type: text/plain, Size: 195 bytes --]

Hi,

The attached patch fixes the BufferedWriter test on platforms that don't
use \n as the line.separator.

I would appreciate it if someone would apply it.

Thanks.

Regards,
Jeroen

[-- Attachment #2: BufferedWriter.Test.patch --]
[-- Type: application/octet-stream, Size: 1471 bytes --]

Index: gnu/testlet/java/io/BufferedWriter/Test.java
===================================================================
RCS file: /cvs/mauve/mauve/gnu/testlet/java/io/BufferedWriter/Test.java,v
retrieving revision 1.1
diff -u -r1.1 Test.java
--- gnu/testlet/java/io/BufferedWriter/Test.java	21 Nov 2002 20:48:21 -0000	1.1
+++ gnu/testlet/java/io/BufferedWriter/Test.java	23 Jul 2004 09:27:36 -0000
@@ -41,7 +41,7 @@
       String str = "I used to live right behind this super-cool bar in\n" +
         "Chicago called Lounge Ax.  They have the best music of pretty\n" +
         "much anyplace in town with a great atmosphere and $1 Huber\n" +
-        "on tap.  I go to tons of shows there, even though I moved.\n";
+        "on tap.  I go to tons of shows there, even though I moved.";
 
       char[] buf = new char[str.length()];
       str.getChars(0, str.length(), buf, 0);
@@ -51,13 +51,14 @@
       bw.write(buf, 5, 8);
       bw.write(buf, 13, 12);
       bw.write(buf[25]);
-      bw.write(buf, 26, buf.length - 27);
+      bw.write(buf, 26, buf.length - 26);
 	  bw.newLine();					   // newLine()
 	  bw.flush();
       bw.close();
 
       String str2 = new String(caw.toCharArray());
-      harness.check(str, str2, "Did all chars make it through?");
+      harness.check(str + System.getProperty("line.separator"), str2,
+	"Did all chars make it through?");
       harness.debug(str2, false);
     }
   catch(IOException e)

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-07-23 17:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-07-23  9:29 Patch: BufferedWriter.Test Jeroen Frijters
2004-07-23 17:54 ` Thomas Zander

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).