From c64570a50cb964327d93893e1142f8dd80e6a8a2 Mon Sep 17 00:00:00 2001 From: Foo Date: Sun, 17 May 2015 15:06:42 +0300 Subject: [PATCH] Add unit tests --- tests/test_segments.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tests/test_segments.py b/tests/test_segments.py index 45aee72d..380fd31d 100644 --- a/tests/test_segments.py +++ b/tests/test_segments.py @@ -1190,6 +1190,18 @@ class TestVim(TestCase): self.assertEqual(self.vim.tabnr(pl=pl, segment_info=segment_info, show_current=True), '1') self.assertEqual(self.vim.tabnr(pl=pl, segment_info=segment_info, show_current=False), None) + def test_tab(self): + pl = Pl() + segment_info = vim_module._get_segment_info() + self.assertEqual(self.vim.tab(pl=pl, segment_info=segment_info), [{ + 'contents': None, + 'literal_contents': (0, '%1T'), + }]) + self.assertEqual(self.vim.tab(pl=pl, segment_info=segment_info, end=True), [{ + 'contents': None, + 'literal_contents': (0, '%T'), + }]) + def test_bufnr(self): pl = Pl() segment_info = vim_module._get_segment_info()