def doit(name, offset): Shell.touch(name) exact_width = nvim.strwidth(name) + file_sz_display_wid + 1 assert exact_width + offset > 0, "Not reasonable to test width <= 0" nvim.command(f'vertical resize {exact_width+offset}') nvim.input('rG') self.assertEqual(nvim.current.window.width, nvim.strwidth(self.clineinfo.visible_text), self.clineinfo.visible_text)
def test_on_bufenter_fs_change(): nvim.input('lh') Shell.touch('dir/b') Shell.mkdir('dir3') nvim.command('split new') nvim.command('quit') nvim.input('zA') assert_content('dir', ind=0, hi='dir', hi_fg=True) assert_content('b', ind=7, level=1, hi='file') assert_content('dir3', ind=9, hi='dir') assert_num_content_line(10) Shell.rm('dir/subdir2/placeholder') nvim.input('lh') assert_num_content_line(9)
def prepare_test_dir(dirname): Shell.mkdir(dirname) os.chdir(dirname) Shell.mkdir('dir/subdir') Shell.mkdir('dir/subdir/subsubdir') Shell.mkdir('dir/subdir2') Shell.touch('dir/a') Shell.touch('.a') Shell.mkdir('dir2/') # The following should be removed when rclone fix "not copying empty # directories" bug. Shell.touch('dir/subdir/subsubdir/placeholder') Shell.touch('dir/subdir2/placeholder') Shell.touch('dir/subdir2/placeholder')
def test_on_bufenter_fs_change_with_expanded_nodes(self): nvim.input('za') nvim.command('split new') Shell.touch('dir/b') nvim.command('quit') self.assert_num_content_line(6)