[Pydev-cvs] org.python.pydev/tests/org/python/pydev/editor PyAutoIndentStrategyTest.java,1.31,1.32
Brought to you by:
fabioz
From: Fabio Z. <fa...@us...> - 2006-03-22 17:39:37
|
Update of /cvsroot/pydev/org.python.pydev/tests/org/python/pydev/editor In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4272/tests/org/python/pydev/editor Modified Files: PyAutoIndentStrategyTest.java Log Message: Index: PyAutoIndentStrategyTest.java =================================================================== RCS file: /cvsroot/pydev/org.python.pydev/tests/org/python/pydev/editor/PyAutoIndentStrategyTest.java,v retrieving revision 1.31 retrieving revision 1.32 diff -C2 -d -r1.31 -r1.32 *** PyAutoIndentStrategyTest.java 22 Mar 2006 16:44:46 -0000 1.31 --- PyAutoIndentStrategyTest.java 22 Mar 2006 17:39:34 -0000 1.32 *************** *** 27,31 **** PyAutoIndentStrategyTest s = new PyAutoIndentStrategyTest("testt"); s.setUp(); ! s.testNewLine9(); s.tearDown(); junit.textui.TestRunner.run(PyAutoIndentStrategyTest.class); --- 27,31 ---- PyAutoIndentStrategyTest s = new PyAutoIndentStrategyTest("testt"); s.setUp(); ! s.testIndent(); s.tearDown(); junit.textui.TestRunner.run(PyAutoIndentStrategyTest.class); *************** *** 134,137 **** --- 134,149 ---- } + public void testIndent() { + strategy.setIndentPrefs(new TestIndentPrefs(true, 4)); + String str = "" + + "while False:\n" + + " if foo:" + + ""; + final Document doc = new Document(str); + DocCmd docCmd = new DocCmd(doc.getLength()-"if foo:".length(), 0, "\n"); + strategy.customizeDocumentCommand(doc, docCmd); + assertEquals("\n ", docCmd.text); + } + public void testNewLine9() { strategy.setIndentPrefs(new TestIndentPrefs(true, 4)); |