Mercurial > vim
comparison src/testdir/test_ex_equal.vim @ 15619:a4882149b661 v8.1.0817
patch 8.1.0817: ":=" command is not tested
commit https://github.com/vim/vim/commit/99531a7604ce89ba82f41cdb519669abb61f3df0
Author: Bram Moolenaar <Bram@vim.org>
Date: Thu Jan 24 22:42:37 2019 +0100
patch 8.1.0817: ":=" command is not tested
Problem: ":=" command is not tested.
Solution: Add a test. (Dominique Pelle, closes https://github.com/vim/vim/issues/3859)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Thu, 24 Jan 2019 22:45:05 +0100 |
parents | |
children | 08940efa6b4e |
comparison
equal
deleted
inserted
replaced
15618:2da95c8f550d | 15619:a4882149b661 |
---|---|
1 " Test Ex := command. | |
2 | |
3 func Test_ex_equal() | |
4 new | |
5 call setline(1, ["foo\tbar", "bar\tfoo"]) | |
6 | |
7 let a = execute('=') | |
8 call assert_equal("\n2", a) | |
9 | |
10 let a = execute('=#') | |
11 call assert_equal("\n2\n 1 foo bar", a) | |
12 | |
13 let a = execute('=l') | |
14 call assert_equal("\n2\nfoo^Ibar$", a) | |
15 | |
16 let a = execute('=p') | |
17 call assert_equal("\n2\nfoo bar", a) | |
18 | |
19 let a = execute('=l#') | |
20 call assert_equal("\n2\n 1 foo^Ibar$", a) | |
21 | |
22 let a = execute('=p#') | |
23 call assert_equal("\n2\n 1 foo bar", a) | |
24 | |
25 let a = execute('.=') | |
26 call assert_equal("\n1", a) | |
27 | |
28 call assert_fails('3=', 'E16:') | |
29 call assert_fails('=x', 'E488:') | |
30 | |
31 bwipe! | |
32 endfunc |