Ejemplo n.º 1
0
	def test_fold_heading_end_of_last_child_next_heading(self):
		# test first heading
		vim.current.window.cursor = (17, 0)
		vim.EVALRESULTS[u'v:lnum'.encode(u'utf-8')] = u'17'.encode(u'utf-8')
		fold_orgmode()
		self.assertEqual(len(vim.CMDHISTORY), 1)
		self.assertEqual(vim.CMDHISTORY[-1], u'let b:fold_expr = ">1"'.encode(u'utf-8'))
Ejemplo n.º 2
0
	def test_fold_heading_middle(self):
		# test first heading
		vim.current.window.cursor = (3, 0)
		vim.EVALRESULTS[u'v:lnum'.encode(u'utf-8')] = u'3'.encode(u'utf-8')
		fold_orgmode()
		self.assertEqual(len(vim.CMDHISTORY), 1)
		self.assertEqual(vim.CMDHISTORY[-1], u'let b:fold_expr = 1'.encode(u'utf-8'))
Ejemplo n.º 3
0
	def test_fold_heading_end_of_last_child(self):
		# test first heading
		vim.current.window.cursor = (16, 0)
		vim.EVALRESULTS[u'v:lnum'.encode(u'utf-8')] = u'16'.encode(u'utf-8')
		fold_orgmode()
		self.assertEqual(len(vim.CMDHISTORY), 1)
		# which is also end of the parent heading <1
		self.assertEqual(vim.CMDHISTORY[-1], u'let b:fold_expr = ">3"'.encode(u'utf-8'))