I broke up with neovim....vim is my best friend now

This commit is contained in:
LinlyBoi
2023-04-30 08:14:07 +03:00
parent 0d185449c5
commit 4a4a6b1e81
5245 changed files with 468325 additions and 25 deletions

View File

@@ -0,0 +1,33 @@
# -*- coding: utf-8 -*-
import unittest
import sys
sys.path.append(u'../ftplugin')
from orgmode.liborgmode.base import Direction, get_domobj_range
from orgmode.liborgmode.headings import Heading
class LibBaseTestCase(unittest.TestCase):
def setUp(self):
self.case1 = """
* head1
heading body
for testing
* head2
** head3
""".split("\n")
def test_base_functions(self):
# direction FORWARD
(start, end) = get_domobj_range(content=self.case1, position=1, identify_fun=Heading.identify_heading)
self.assertEqual((start, end), (1, 3))
(start, end) = get_domobj_range(content=self.case1, position=3, direction=Direction.BACKWARD, \
identify_fun=Heading.identify_heading)
self.assertEqual((start, end), (1, 3))
def suite():
return unittest.TestLoader() \
.loadTestsFromTestCase(
LibBaseTestCase)