String text = createTemplateText("\r\n"); saveFile(TEMPLATE_FILE, templateHeader("\r\n").append(text).toString());
String nonOSLineSeparator = "\r\n".equals(System.getProperties().getProperty("line.separator")) ? "\n" : "\r\n"; String text = createTemplateText(nonOSLineSeparator); saveFile(TEMPLATE_FILE, templateHeader(nonOSLineSeparator).append(text).toString());
  public void testEmmiter() throws Exception  {    String text = createTemplateText("\r\n");    saveFile(TEMPLATE_FILE, templateHeader("\r\n").append(text).toString());        JETEmitter emitter = new JETEmitter(TEMPLATE_FILE.getAbsolutePath());    String generatedText = emitter.generate(new NullProgressMonitor(), new Object[]{""});        String lineSeparator = System.getProperties().getProperty("line.separator");    if(!"\r\n".equals(lineSeparator))    {      generatedText.replaceAll(lineSeparator, "\r\n");    }    assertEquals(text, generatedText);          }