[Pydev-cvs] org.python.pydev/tests_completions/org/python/pydev/editor/codecompletion/templates Py
Brought to you by:
fabioz
From: Fabio Z. <fa...@us...> - 2008-07-28 15:53:23
|
Update of /cvsroot/pydev/org.python.pydev/tests_completions/org/python/pydev/editor/codecompletion/templates In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1469/tests_completions/org/python/pydev/editor/codecompletion/templates Modified Files: PyDocumentTemplateContextTest.java Log Message: synching mercurial Index: PyDocumentTemplateContextTest.java =================================================================== RCS file: /cvsroot/pydev/org.python.pydev/tests_completions/org/python/pydev/editor/codecompletion/templates/PyDocumentTemplateContextTest.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** PyDocumentTemplateContextTest.java 4 Aug 2007 16:01:10 -0000 1.1 --- PyDocumentTemplateContextTest.java 28 Jul 2008 15:53:32 -0000 1.2 *************** *** 44,47 **** --- 44,66 ---- + //let's check if we have a template with \n and a document with \r\n (it should be applied with \r\n) + doc = new Document("" + + "\r\n " + + ""); + context = new PyDocumentTemplateContext(new TemplateContextType(), doc, doc.getLength(), 0, " ", new TestIndentPrefs(true, 4)); + template = new Template("", "", "", "if a\n\tprint 'a: '", true); + buffer = context.evaluate(template); + assertEquals("if a\r\n print 'a: '", buffer.getString()); + + //let's check if we have a template with \r\n and a document with \r (it should be applied with \r) + doc = new Document("" + + "\r " + + ""); + context = new PyDocumentTemplateContext(new TemplateContextType(), doc, doc.getLength(), 0, " ", new TestIndentPrefs(true, 4)); + template = new Template("", "", "", "if a\r\n\tprint 'a: '", true); + buffer = context.evaluate(template); + assertEquals("if a\r print 'a: '", buffer.getString()); + + } } |