fix EditorStateParticipantTest#testRestoreStateRetainState 

It fails if default line separator is different than the one used in
state-3.7.xml file.

Change-Id: I3825cb55bedc2d538b329bd82c00ad01bba6dc70
diff --git a/org.eclipse.mylyn.context.tests/src/org/eclipse/mylyn/context/tests/EditorStateParticipantTest.java b/org.eclipse.mylyn.context.tests/src/org/eclipse/mylyn/context/tests/EditorStateParticipantTest.java
index 0c6a01f..f11332c 100644
--- a/org.eclipse.mylyn.context.tests/src/org/eclipse/mylyn/context/tests/EditorStateParticipantTest.java
+++ b/org.eclipse.mylyn.context.tests/src/org/eclipse/mylyn/context/tests/EditorStateParticipantTest.java
@@ -211,8 +211,15 @@
 		OutputStream out = new ByteArrayOutputStream();
 		OutputStreamWriter writer = new OutputStreamWriter(out);
 		memento.save(writer);
+		String s = out.toString();
 		// when reading from disk new lines are escaped
-		return out.toString().replaceAll("
", "\n").replaceAll("WORKSPACE", workspace.getAbsolutePath());
+		s = s.replaceAll("
", "\r");
+		s = s.replaceAll("
", "\n");
+		// always use LF as line separator
+		s = s.replaceAll("\r\n", "\n");
+		// resolve workspace variable
+		s = s.replaceAll("WORKSPACE", workspace.getAbsolutePath());
+		return s;
 	}
 
 	/**