[Pydev-cvs] org.python.pydev/tests/org/python/pydev/editor PyAutoIndentStrategyTest.java,1.46,1.47
Brought to you by:
fabioz
From: Fabio Z. <fa...@us...> - 2006-05-23 12:23:14
|
Update of /cvsroot/pydev/org.python.pydev/tests/org/python/pydev/editor In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32594/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.46 retrieving revision 1.47 diff -C2 -d -r1.46 -r1.47 *** PyAutoIndentStrategyTest.java 23 May 2006 12:16:46 -0000 1.46 --- PyAutoIndentStrategyTest.java 23 May 2006 12:22:55 -0000 1.47 *************** *** 226,229 **** --- 226,281 ---- + + public void testTabIndentToLevel2() { + strategy.setIndentPrefs(new TestIndentPrefs(true, 4)); + String str = "" + + "class ContaminantFont( Barrier, ModelBase ):\n" + + " '''\n" + + " This class contains information to edit a contaminant.\n" + + " '''\n" + + " properties.create( \n" + + " \n" + + " #defines where is the source (in the water or in the soil)\n" + + " sourceLocation = SOURCE_LOCATION_WATER,\n" + + " \n" + + "" + //we're here (indent to the first level) + ""; + + + final Document doc = new Document(str); + int offset = doc.getLength(); + DocCmd docCmd = new DocCmd(offset, 0, "\t"); + strategy.customizeDocumentCommand(doc, docCmd); + assertEquals(" ", docCmd.text); + + } + + + + public void testTabIndentToLevel3() { + strategy.setIndentPrefs(new TestIndentPrefs(true, 4)); + String str = "" + + "class ContaminantFont( Barrier, ModelBase ):\n" + + " '''\n" + + " This class contains information to edit a contaminant.\n" + + " '''\n" + + " properties.create( \n" + + " \n" + + " #defines where is the source (in the water or in the soil)\n" + + " sourceLocation = SOURCE_LOCATION_WATER,\n" + + " \n" + + " " + //now that we're already in the first level, indent to the current level + ""; + + + final Document doc = new Document(str); + int offset = doc.getLength(); + DocCmd docCmd = new DocCmd(offset, 0, "\t"); + strategy.customizeDocumentCommand(doc, docCmd); + assertEquals(" ", docCmd.text); + + } + + public void testNoAutoIndentClosingPar() { strategy.setIndentPrefs(new TestIndentPrefs(true, 4)); |