Mercurial > vim
comparison src/testdir/test_tabpage.vim @ 22502:1503ecd54f8a v8.2.1799
patch 8.2.1799: some Normal mode commands not fully tested
Commit: https://github.com/vim/vim/commit/d1ad99b65470d3e754f6a0588a6b0dc2214a1eab
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Oct 4 16:16:54 2020 +0200
patch 8.2.1799: some Normal mode commands not fully tested
Problem: Some Normal mode commands not fully tested.
Solution: Add a few more tests. (Yegappan Lakshmanan, closes https://github.com/vim/vim/issues/7073)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 04 Oct 2020 16:30:03 +0200 |
parents | 860cad58f557 |
children | 93f90f2ff4e9 |
comparison
equal
deleted
inserted
replaced
22501:ce527f2034c0 | 22502:1503ecd54f8a |
---|---|
681 call feedkeys(TabMenuNewItemCode(1), "Lx!") | 681 call feedkeys(TabMenuNewItemCode(1), "Lx!") |
682 call assert_equal(1, tabpagenr()) | 682 call assert_equal(1, tabpagenr()) |
683 call assert_equal(3, tabpagenr('$')) | 683 call assert_equal(3, tabpagenr('$')) |
684 | 684 |
685 " go to tab page 2 in operator-pending mode (should beep) | 685 " go to tab page 2 in operator-pending mode (should beep) |
686 call assert_beeps('call feedkeys("f" .. TabLineSelectPageCode(2), "Lx!")') | 686 call assert_beeps('call feedkeys("c" .. TabLineSelectPageCode(2), "Lx!")') |
687 call assert_equal(2, tabpagenr()) | |
688 call assert_equal(3, tabpagenr('$')) | |
687 | 689 |
688 " open new tab page before tab page 1 in operator-pending mode (should beep) | 690 " open new tab page before tab page 1 in operator-pending mode (should beep) |
689 call assert_beeps('call feedkeys("f" .. TabMenuNewItemCode(1), "Lx!")') | 691 call assert_beeps('call feedkeys("c" .. TabMenuNewItemCode(1), "Lx!")') |
692 call assert_equal(1, tabpagenr()) | |
693 call assert_equal(4, tabpagenr('$')) | |
690 | 694 |
691 " open new tab page after tab page 3 in normal mode | 695 " open new tab page after tab page 3 in normal mode |
692 call feedkeys(TabMenuNewItemCode(4), "Lx!") | 696 call feedkeys(TabMenuNewItemCode(4), "Lx!") |
693 call assert_equal(4, tabpagenr()) | 697 call assert_equal(4, tabpagenr()) |
694 call assert_equal(4, tabpagenr('$')) | 698 call assert_equal(5, tabpagenr('$')) |
695 | 699 |
696 " go to tab page 2 in insert mode | 700 " go to tab page 2 in insert mode |
697 call feedkeys("i" .. TabLineSelectPageCode(2) .. "\<C-C>", "Lx!") | 701 call feedkeys("i" .. TabLineSelectPageCode(2) .. "\<C-C>", "Lx!") |
698 call assert_equal(2, tabpagenr()) | 702 call assert_equal(2, tabpagenr()) |
699 | 703 |
700 " close tab page 2 in insert mode | 704 " close tab page 2 in insert mode |
701 call feedkeys("i" .. TabMenuCloseItemCode(2) .. "\<C-C>", "Lx!") | 705 call feedkeys("i" .. TabMenuCloseItemCode(2) .. "\<C-C>", "Lx!") |
702 call assert_equal(3, tabpagenr('$')) | 706 call assert_equal(4, tabpagenr('$')) |
703 | 707 |
704 " open new tab page before tab page 3 in insert mode | 708 " open new tab page before tab page 3 in insert mode |
705 call feedkeys("i" .. TabMenuNewItemCode(3) .. "\<C-C>", "Lx!") | 709 call feedkeys("i" .. TabMenuNewItemCode(3) .. "\<C-C>", "Lx!") |
706 call assert_equal(3, tabpagenr()) | 710 call assert_equal(3, tabpagenr()) |
707 call assert_equal(4, tabpagenr('$')) | 711 call assert_equal(5, tabpagenr('$')) |
708 | 712 |
709 " open new tab page after tab page 4 in insert mode | 713 " open new tab page after tab page 4 in insert mode |
710 call feedkeys("i" .. TabMenuNewItemCode(5) .. "\<C-C>", "Lx!") | 714 call feedkeys("i" .. TabMenuNewItemCode(5) .. "\<C-C>", "Lx!") |
711 call assert_equal(5, tabpagenr()) | 715 call assert_equal(5, tabpagenr()) |
712 call assert_equal(5, tabpagenr('$')) | 716 call assert_equal(6, tabpagenr('$')) |
713 | 717 |
714 %bw! | 718 %bw! |
715 endfunc | 719 endfunc |
716 | 720 |
717 " Test for changing the current tab page from an autocmd when closing a tab | 721 " Test for changing the current tab page from an autocmd when closing a tab |