summaryrefslogtreecommitdiff
path: root/data/vim/patches/8.1.0875
blob: 923e42ee66f818378e14fc6cda2d4b6fec5f25ee (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
To: vim_dev@googlegroups.com
Subject: Patch 8.1.0875
Fcc: outbox
From: Bram Moolenaar <Bram@moolenaar.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
------------

Patch 8.1.0875
Problem:    Not all errors of marks and findfile()/finddir() are tested.
Solution:   Add more test coverage. (Dominique Pelle)
Files:	    src/testdir/test_findfile.vim, src/testdir/test_marks.vim


*** ../vim-8.1.0874/src/testdir/test_findfile.vim	2019-01-30 22:13:30.409988847 +0100
--- src/testdir/test_findfile.vim	2019-02-04 21:13:58.261374549 +0100
***************
*** 119,124 ****
--- 119,132 ----
    let &shellslash = save_shellslash
  endfunc
  
+ func Test_findfile_error()
+   call assert_fails('call findfile([])', 'E730:')
+   call assert_fails('call findfile("x", [])', 'E730:')
+   call assert_fails('call findfile("x", "", [])', 'E745:')
+   call assert_fails('call findfile("x", "**x")', 'E343:')
+   call assert_fails('call findfile("x", repeat("x", 5000))', 'E854:')
+ endfunc
+ 
  " Test finddir({name} [, {path} [, {count}]])
  func Test_finddir()
    let save_path = &path
***************
*** 167,169 ****
--- 175,185 ----
    let &path = save_path
    let &shellslash = save_shellslash
  endfunc
+ 
+ func Test_finddir_error()
+   call assert_fails('call finddir([])', 'E730:')
+   call assert_fails('call finddir("x", [])', 'E730:')
+   call assert_fails('call finddir("x", "", [])', 'E745:')
+   call assert_fails('call finddir("x", "**x")', 'E343:')
+   call assert_fails('call finddir("x", repeat("x", 5000))', 'E854:')
+ endfunc
*** ../vim-8.1.0874/src/testdir/test_marks.vim	2019-01-24 17:59:35.139217458 +0100
--- src/testdir/test_marks.vim	2019-02-04 21:13:58.261374549 +0100
***************
*** 133,135 ****
--- 133,176 ----
  
    bwipe!
  endfunc
+ 
+ func Test_delmarks()
+   new
+   norm mx
+   norm `x
+   delmarks x
+   call assert_fails('norm `x', 'E20:')
+ 
+   " Deleting an already deleted mark should not fail.
+   delmarks x
+ 
+   " Test deleting a range of marks.
+   norm ma
+   norm mb
+   norm mc
+   norm mz
+   delmarks b-z
+   norm `a
+   call assert_fails('norm `b', 'E20:')
+   call assert_fails('norm `c', 'E20:')
+   call assert_fails('norm `z', 'E20:')
+   call assert_fails('delmarks z-b', 'E475:')
+ 
+   call assert_fails('delmarks', 'E471:')
+   call assert_fails('delmarks /', 'E475:')
+ 
+   " Test delmarks!
+   norm mx
+   norm `x
+   delmarks!
+   call assert_fails('norm `x', 'E20:')
+   call assert_fails('delmarks! x', 'E474:')
+ 
+   bwipe!
+ endfunc
+ 
+ func Test_mark_error()
+   call assert_fails('mark', 'E471:')
+   call assert_fails('mark xx', 'E488:')
+   call assert_fails('mark _', 'E191:')
+ endfunc
*** ../vim-8.1.0874/src/version.c	2019-02-04 20:30:13.973460115 +0100
--- src/version.c	2019-02-04 21:13:09.765720718 +0100
***************
*** 785,786 ****
--- 785,788 ----
  {   /* Add new patch number below this line */
+ /**/
+     875,
  /**/

-- 
LAUNCELOT: Isn't there a St. Aaaaarrrrrrggghhh's in Cornwall?
ARTHUR:    No, that's Saint Ives.
                 "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///