summaryrefslogtreecommitdiff
path: root/data/vim/patches/8.1.0318
blob: 10ecffb355ee8f9924c4903676eebaec53412a05 (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
To: vim_dev@googlegroups.com
Subject: Patch 8.1.0318
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.0318
Problem:    The getftype() test may fail for char devices if the file
            disappeared in between the listing and the getftype() call.
Solution:   Ignore empty result. (Ozaki Kiichi, closes #3360)
Files:	    src/testdir/test_stat.vim


*** ../vim-8.1.0317/src/testdir/test_stat.vim	2018-08-09 22:08:53.017560100 +0200
--- src/testdir/test_stat.vim	2018-08-22 20:14:37.597732518 +0200
***************
*** 141,157 ****
    endif
  
    for cdevfile in systemlist('find /dev -type c -maxdepth 2 2>/dev/null')
!     call assert_equal('cdev', getftype(cdevfile))
    endfor
  
    for bdevfile in systemlist('find /dev -type b -maxdepth 2 2>/dev/null')
!     call assert_equal('bdev', getftype(bdevfile))
    endfor
  
    " The /run/ directory typically contains socket files.
    " If it does not, test won't fail but will not test socket files.
    for socketfile in systemlist('find /run -type s -maxdepth 2 2>/dev/null')
!     call assert_equal('socket', getftype(socketfile))
    endfor
  
    " TODO: file type 'other' is not tested. How can we test it?
--- 141,169 ----
    endif
  
    for cdevfile in systemlist('find /dev -type c -maxdepth 2 2>/dev/null')
!     let type = getftype(cdevfile)
!     " ignore empty result, can happen if the file disappeared
!     if type != ''
!       call assert_equal('cdev', type)
!     endif
    endfor
  
    for bdevfile in systemlist('find /dev -type b -maxdepth 2 2>/dev/null')
!     let type = getftype(bdevfile)
!     " ignore empty result, can happen if the file disappeared
!     if type != ''
!       call assert_equal('bdev', type)
!     endif
    endfor
  
    " The /run/ directory typically contains socket files.
    " If it does not, test won't fail but will not test socket files.
    for socketfile in systemlist('find /run -type s -maxdepth 2 2>/dev/null')
!     let type = getftype(socketfile)
!     " ignore empty result, can happen if the file disappeared
!     if type != ''
!       call assert_equal('socket', type)
!     endif
    endfor
  
    " TODO: file type 'other' is not tested. How can we test it?
*** ../vim-8.1.0317/src/version.c	2018-08-22 20:06:22.829022787 +0200
--- src/version.c	2018-08-22 20:11:52.166808526 +0200
***************
*** 796,797 ****
--- 796,799 ----
  {   /* Add new patch number below this line */
+ /**/
+     318,
  /**/

-- 
BLACK KNIGHT: The Black Knight always triumphs. Have at you!
   ARTHUR takes his last leg off.  The BLACK KNIGHT's body lands upright.
BLACK KNIGHT: All right, we'll call it a draw.
                 "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    ///