Update of /cvsroot/pydev/org.python.pydev/tests/org/python/pydev/editor
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28865/tests/org/python/pydev/editor
Modified Files:
PyAutoIndentStrategyTest.java
Log Message:
Fixed problem when smart indent was off.
Index: PyAutoIndentStrategyTest.java
===================================================================
RCS file: /cvsroot/pydev/org.python.pydev/tests/org/python/pydev/editor/PyAutoIndentStrategyTest.java,v
retrieving revision 1.65
retrieving revision 1.66
diff -C2 -d -r1.65 -r1.66
*** PyAutoIndentStrategyTest.java 6 Apr 2008 19:51:34 -0000 1.65
--- PyAutoIndentStrategyTest.java 3 Jul 2008 01:04:04 -0000 1.66
***************
*** 26,30 ****
PyAutoIndentStrategyTest s = new PyAutoIndentStrategyTest("testt");
s.setUp();
! s.testCommentsIndent2();
s.tearDown();
junit.textui.TestRunner.run(PyAutoIndentStrategyTest.class);
--- 26,30 ----
PyAutoIndentStrategyTest s = new PyAutoIndentStrategyTest("testt");
s.setUp();
! s.testNoIndent();
s.tearDown();
junit.textui.TestRunner.run(PyAutoIndentStrategyTest.class);
***************
*** 843,846 ****
--- 843,859 ----
}
+ public void testNoIndent() {
+ TestIndentPrefs prefs = new TestIndentPrefs(true, 4);
+ prefs.smartIndentAfterPar = false;
+ strategy.setIndentPrefs(prefs);
+
+ String doc = "" +
+ "def m1(): \n";
+ DocCmd docCmd = new DocCmd(0, 0, "\n");
+ strategy.customizeDocumentCommand(new Document(doc), docCmd);
+ String expected = "\n";
+ assertEquals(expected, docCmd.text);
+ }
+
public void testDedent() {
strategy.setIndentPrefs(new TestIndentPrefs(true, 4));
|