changeset 19464:1576facafb62

8022615: [nightly] Two nashorn print tests fail in nightly builds on Windows Reviewed-by: lagergren, jlaskey
author sundar
date Mon, 12 Aug 2013 17:08:01 +0530
parents d97df8f5945d
children 0dcae2f1ca9f
files nashorn/test/src/jdk/nashorn/api/scripting/ScriptEngineTest.java
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/nashorn/test/src/jdk/nashorn/api/scripting/ScriptEngineTest.java	Mon Aug 12 13:31:43 2013 +0200
+++ b/nashorn/test/src/jdk/nashorn/api/scripting/ScriptEngineTest.java	Mon Aug 12 17:08:01 2013 +0530
@@ -1235,7 +1235,8 @@
             fail(t.getMessage());
         }
 
-        assertEquals(sw.toString(), "hello\n");
+        // dos2unix - fix line endings if running on windows
+        assertEquals(sw.toString().replaceAll("\r", ""), "hello\n");
     }
 
     @Test
@@ -1252,6 +1253,7 @@
             fail(t.getMessage());
         }
 
-        assertEquals(sw.toString(), "34 true hello\n");
+        // dos2unix - fix line endings if running on windows
+        assertEquals(sw.toString().replaceAll("\r", ""), "34 true hello\n");
     }
 }