langtools/test/tools/javap/T4975569.java
changeset 3768 46e043243c0e
parent 3547 4471bb5983d1
child 3890 b53fced26fa4
--- a/langtools/test/tools/javap/T4975569.java	Thu Aug 27 15:12:36 2009 -0700
+++ b/langtools/test/tools/javap/T4975569.java	Thu Aug 27 17:39:16 2009 -0700
@@ -65,6 +65,7 @@
     int errors;
 
     String javap(String className) {
+        String newline = System.getProperty("line.separator");
         String testClasses = System.getProperty("test.classes", ".");
         StringWriter sw = new StringWriter();
         PrintWriter out = new PrintWriter(sw);
@@ -73,7 +74,7 @@
         if (rc != 0)
             throw new Error("javap failed. rc=" + rc);
         out.close();
-        String output = sw.toString();
+        String output = sw.toString().replaceAll(newline, "\n");
         System.out.println("class " + className);
         System.out.println(output);
         return output;