Mercurial > vim
comparison src/testdir/test_diffmode.vim @ 17837:f71ee7b04f0b v8.1.1915
patch 8.1.1915: more functions can be used as methods
Commit: https://github.com/vim/vim/commit/1a3a89168d61c2fed91cbca812cf1c6983901b79
Author: Bram Moolenaar <Bram@vim.org>
Date: Fri Aug 23 22:31:37 2019 +0200
patch 8.1.1915: more functions can be used as methods
Problem: More functions can be used as methods.
Solution: Make various functions usable as a method.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Fri, 23 Aug 2019 22:45:04 +0200 |
parents | 4c7097a980a5 |
children | 0dcc2ee838dd |
comparison
equal
deleted
inserted
replaced
17836:a3061757584b | 17837:f71ee7b04f0b |
---|---|
672 | 672 |
673 call diff_hlID(1, 1)->synIDattr("name")->assert_equal("DiffChange") | 673 call diff_hlID(1, 1)->synIDattr("name")->assert_equal("DiffChange") |
674 call diff_hlID(1, 2)->synIDattr("name")->assert_equal("DiffText") | 674 call diff_hlID(1, 2)->synIDattr("name")->assert_equal("DiffText") |
675 call diff_hlID(2, 1)->synIDattr("name")->assert_equal("") | 675 call diff_hlID(2, 1)->synIDattr("name")->assert_equal("") |
676 call diff_hlID(3, 1)->synIDattr("name")->assert_equal("DiffAdd") | 676 call diff_hlID(3, 1)->synIDattr("name")->assert_equal("DiffAdd") |
677 call diff_hlID(4, 1)->synIDattr("name")->assert_equal("") | 677 eval 4->diff_hlID(1)->synIDattr("name")->assert_equal("") |
678 | 678 |
679 wincmd w | 679 wincmd w |
680 call assert_equal(synIDattr(diff_hlID(1, 1), "name"), "DiffChange") | 680 call assert_equal(synIDattr(diff_hlID(1, 1), "name"), "DiffChange") |
681 call assert_equal(synIDattr(diff_hlID(2, 1), "name"), "") | 681 call assert_equal(synIDattr(diff_hlID(2, 1), "name"), "") |
682 call assert_equal(synIDattr(diff_hlID(3, 1), "name"), "") | 682 call assert_equal(synIDattr(diff_hlID(3, 1), "name"), "") |
691 vnew | 691 vnew |
692 call setline(1, [1, 2, 'y', 'y', 3, 4]) | 692 call setline(1, [1, 2, 'y', 'y', 3, 4]) |
693 diffthis | 693 diffthis |
694 redraw | 694 redraw |
695 | 695 |
696 call assert_equal([0, 0, 0, 0, 0, 0, 0, 1, 0], map(range(-1, 7), 'diff_filler(v:val)')) | 696 call assert_equal([0, 0, 0, 0, 0, 0, 0, 1, 0], map(range(-1, 7), 'v:val->diff_filler()')) |
697 wincmd w | 697 wincmd w |
698 call assert_equal([0, 0, 0, 0, 2, 0, 0, 0], map(range(-1, 6), 'diff_filler(v:val)')) | 698 call assert_equal([0, 0, 0, 0, 2, 0, 0, 0], map(range(-1, 6), 'diff_filler(v:val)')) |
699 | 699 |
700 %bwipe! | 700 %bwipe! |
701 endfunc | 701 endfunc |