def testBug113Find(self): buffer = fixtures.buffer("bug_113") all_finds = Search.find(buffer, 'all', Search.SearchDirection.FORWARD) self.assertEqual(buffer.cursor.pos, (1,7)) all_finds = Search.find(buffer, 'all', Search.SearchDirection.FORWARD) self.assertEqual(buffer.cursor.pos, (2,1)) all_finds = Search.find(buffer, 'all', Search.SearchDirection.FORWARD) self.assertEqual(buffer.cursor.pos, (3,1)) all_finds = Search.find(buffer, 'all', Search.SearchDirection.FORWARD) self.assertEqual(buffer.cursor.pos, (4,6)) all_finds = Search.find(buffer, 'all', Search.SearchDirection.FORWARD) self.assertEqual(buffer.cursor.pos, (1,7))
def testBug113Find(self): buffer = fixtures.buffer("bug_113") all_finds = Search.find(buffer, 'all', Search.SearchDirection.FORWARD) self.assertEqual(buffer.cursor.pos, (1, 7)) all_finds = Search.find(buffer, 'all', Search.SearchDirection.FORWARD) self.assertEqual(buffer.cursor.pos, (2, 1)) all_finds = Search.find(buffer, 'all', Search.SearchDirection.FORWARD) self.assertEqual(buffer.cursor.pos, (3, 1)) all_finds = Search.find(buffer, 'all', Search.SearchDirection.FORWARD) self.assertEqual(buffer.cursor.pos, (4, 6)) all_finds = Search.find(buffer, 'all', Search.SearchDirection.FORWARD) self.assertEqual(buffer.cursor.pos, (1, 7))
def testSearch(self): buffer = fixtures.buffer("real_case_editareacontroller.py") self.assertEqual(buffer.cursor.pos, (1,1)) Search.find(buffer, 'Key', direction=Search.SearchDirection.FORWARD) self.assertEqual(buffer.cursor.pos, (8,28)) Search.find(buffer, 'Key', direction=Search.SearchDirection.FORWARD) self.assertEqual(buffer.cursor.pos, (8,32)) Search.find(buffer, 'Key', direction=Search.SearchDirection.FORWARD) self.assertEqual(buffer.cursor.pos, (9,28)) Search.find(buffer, 'Key', direction=Search.SearchDirection.BACKWARD) self.assertEqual(buffer.cursor.pos, (8,32))
def testSearch(self): buffer = fixtures.buffer("real_case_editareacontroller.py") self.assertEqual(buffer.cursor.pos, (1, 1)) Search.find(buffer, 'Key', direction=Search.SearchDirection.FORWARD) self.assertEqual(buffer.cursor.pos, (8, 28)) Search.find(buffer, 'Key', direction=Search.SearchDirection.FORWARD) self.assertEqual(buffer.cursor.pos, (8, 32)) Search.find(buffer, 'Key', direction=Search.SearchDirection.FORWARD) self.assertEqual(buffer.cursor.pos, (9, 28)) Search.find(buffer, 'Key', direction=Search.SearchDirection.BACKWARD) self.assertEqual(buffer.cursor.pos, (8, 32))