Exemplo n.º 1
0
 def test_indentLessWithSelection(self):
     self.document.setPlainText('    foo\n    bar\nbaz')
     cursor = QTextCursor(self.document)
     cursor.setPosition(5)
     cursor.setPosition(11, QTextCursor.KeepAnchor)
     documentIndentLess(self.document, cursor, self.settings)
     self.assertEqual('foo\nbar\nbaz', self.document.toPlainText())
Exemplo n.º 2
0
	def test_indentLessWithSelection(self):
		self.document.setPlainText('    foo\n    bar\nbaz')
		cursor = QTextCursor(self.document)
		cursor.setPosition(5)
		cursor.setPosition(11, QTextCursor.KeepAnchor)
		documentIndentLess(self.document, cursor, self.settings)
		self.assertEqual('foo\nbar\nbaz', self.document.toPlainText())
Exemplo n.º 3
0
 def test_indentLess(self):
     self.document.setPlainText('        foo')
     cursor = QTextCursor(self.document)
     cursor.setPosition(10)
     documentIndentLess(self.document, cursor, self.settings)
     self.assertEqual('    foo', self.document.toPlainText())
     documentIndentLess(self.document, cursor, self.settings)
     self.assertEqual('foo', self.document.toPlainText())
Exemplo n.º 4
0
	def test_indentLess(self):
		self.document.setPlainText('        foo')
		cursor = QTextCursor(self.document)
		cursor.setPosition(10)
		documentIndentLess(self.document, cursor, self.settings)
		self.assertEqual('    foo', self.document.toPlainText())
		documentIndentLess(self.document, cursor, self.settings)
		self.assertEqual('foo', self.document.toPlainText())