1 7 package com.openedit.modules.html; 8 9 10 import junit.framework.TestCase; 11 12 18 public class HtmlEditorModuleTest extends TestCase { 19 20 public HtmlEditorModuleTest(String arg0) { 21 super(arg0); 22 } 23 24 public void testEscapeViewContent() { 25 String content = "Font family: \"Courier-new\"\r\nAnother: \"Verdana\""; 26 String desiredContent = "Font family: \\\"Courier-new\\\"\\nAnother: \\\"Verdana\\\""; 27 28 System.out.println("desiredContent = " + desiredContent ); 29 EditorSession session = new EditorSession(); 31 String newContent = session.createVariable( content ); 32 33 assertEquals( "view content does not match", desiredContent, newContent ); 34 } 35 } 36 | Popular Tags |