[Pydev-cvs] org.python.pydev/tests/org/python/pydev/editor/actions PySelectionTest.java,1.1,1.2
Brought to you by:
fabioz
From: Fabio Z. <fa...@us...> - 2005-04-14 13:13:03
|
Update of /cvsroot/pydev/org.python.pydev/tests/org/python/pydev/editor/actions In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2991/tests/org/python/pydev/editor/actions Modified Files: PySelectionTest.java Log Message: Some enhanced content assistants added. Index: PySelectionTest.java =================================================================== RCS file: /cvsroot/pydev/org.python.pydev/tests/org/python/pydev/editor/actions/PySelectionTest.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** PySelectionTest.java 12 Apr 2005 16:29:44 -0000 1.1 --- PySelectionTest.java 14 Apr 2005 13:12:21 -0000 1.2 *************** *** 51,59 **** public void testGeneral() throws BadLocationException { ps = new PySelection(doc, new TextSelection(doc, 0,0)); ! assertEquals("",ps.getSelection()); assertEquals("",ps.getLineContentsToCursor()); ps.selectCompleteLine(); ! assertEquals("TestLine1",ps.getSelection()); assertEquals("TestLine1",ps.getLine(0)); assertEquals("TestLine2#comm2",ps.getLine(1)); --- 51,59 ---- public void testGeneral() throws BadLocationException { ps = new PySelection(doc, new TextSelection(doc, 0,0)); ! assertEquals("TestLine1",ps.getCursorLineContents()); assertEquals("",ps.getLineContentsToCursor()); ps.selectCompleteLine(); ! assertEquals("TestLine1",ps.getCursorLineContents()); assertEquals("TestLine1",ps.getLine(0)); assertEquals("TestLine2#comm2",ps.getLine(1)); *************** *** 70,83 **** public void testSelectAll() { ps = new PySelection(doc, new TextSelection(doc, 0,0)); ! ps.selectAll(false); ! assertEquals(docContents, ps.getSelection()); ps = new PySelection(doc, new TextSelection(doc, 0,9)); //first line selected ! ps.selectAll(false); //changes ! assertEquals(docContents, ps.getSelection()); ps = new PySelection(doc, new TextSelection(doc, 0,9)); //first line selected ! ps.selectAll(true); //nothing changes ! assertEquals(ps.getLine(0), ps.getSelection()); --- 70,83 ---- public void testSelectAll() { ps = new PySelection(doc, new TextSelection(doc, 0,0)); ! ps.selectAll(true); ! assertEquals(docContents, ps.getCursorLineContents()+"\n"); ps = new PySelection(doc, new TextSelection(doc, 0,9)); //first line selected ! ps.selectAll(true); //changes ! assertEquals(docContents, ps.getCursorLineContents()+"\n"); ps = new PySelection(doc, new TextSelection(doc, 0,9)); //first line selected ! ps.selectAll(false); //nothing changes ! assertEquals(ps.getLine(0), ps.getCursorLineContents()); |