[Pydev-cvs] org.python.pydev/tests/org/python/pydev/editor PyAutoIndentStrategyTest.java,1.29,1.30
Brought to you by:
fabioz
From: Fabio Z. <fa...@us...> - 2006-03-19 18:48:17
|
Update of /cvsroot/pydev/org.python.pydev/tests/org/python/pydev/editor In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10450/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.29 retrieving revision 1.30 diff -C2 -d -r1.29 -r1.30 *** PyAutoIndentStrategyTest.java 19 Mar 2006 01:51:50 -0000 1.29 --- PyAutoIndentStrategyTest.java 19 Mar 2006 18:48:12 -0000 1.30 *************** *** 27,31 **** PyAutoIndentStrategyTest s = new PyAutoIndentStrategyTest("testt"); s.setUp(); ! s.testNewLine7(); s.tearDown(); junit.textui.TestRunner.run(PyAutoIndentStrategyTest.class); --- 27,31 ---- PyAutoIndentStrategyTest s = new PyAutoIndentStrategyTest("testt"); s.setUp(); ! s.testNewLine9(); s.tearDown(); junit.textui.TestRunner.run(PyAutoIndentStrategyTest.class); *************** *** 120,123 **** --- 120,149 ---- } + public void testNewLine8() { + strategy.setIndentPrefs(new TestIndentPrefs(true, 4)); + String str = "" + + "class C:\n" + + " pass\n" + + " a = 30\n" + + " " + + ""; + final Document doc = new Document(str); + DocCmd docCmd = new DocCmd(doc.getLength(), 0, "\n"); + strategy.customizeDocumentCommand(doc, docCmd); + assertEquals("\n ", docCmd.text); + } + + public void testNewLine9() { + strategy.setIndentPrefs(new TestIndentPrefs(true, 4)); + String str = "" + + "class C:\n" + + " try:" + + ""; + final Document doc = new Document(str); + DocCmd docCmd = new DocCmd(doc.getLength(), 0, "\n"); + strategy.customizeDocumentCommand(doc, docCmd); + assertEquals("\n ", docCmd.text); + } + public void testNewLine4() { strategy.setIndentPrefs(new TestIndentPrefs(true, 4)); |