summaryrefslogtreecommitdiff
path: root/data/vim/patches/8.1.0831
blob: 325b02fc89f5bcc17f86e40975e80b292b996d1f (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
To: vim_dev@googlegroups.com
Subject: Patch 8.1.0831
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.0831
Problem:    Xxd test fails if man page has dos fileformat.
Solution:   Make a copy with unix fileformat.
Files:	    src/testdir/test_xxd.vim


*** ../vim-8.1.0830/src/testdir/test_xxd.vim	2019-01-26 14:11:15.083587014 +0100
--- src/testdir/test_xxd.vim	2019-01-27 14:37:55.120788981 +0100
***************
*** 53,66 ****
      call assert_equal(expected[2:], getline(1,'$'), s:Mess(s:test))
    endfor
  
    " Test 5: Print 120 bytes as continuous hexdump with 20 octets per line
    let s:test += 1
    %d
!   let fname = '../../runtime/doc/xxd.1'
!   if has('win32') && !filereadable(fname)
!     let fname = '../../doc/xxd.1'
!   endif
!   exe '0r! ' . s:xxd_cmd . ' -l 120 -ps -c20 ' . fname
    $d
    let expected = [
        \ '2e54482058584420312022417567757374203139',
--- 53,72 ----
      call assert_equal(expected[2:], getline(1,'$'), s:Mess(s:test))
    endfor
  
+   " The following tests use the xxd man page.
+   " For these tests to pass, the fileformat must be "unix".
+   let man_copy = 'Xxd.1'
+   let man_page = '../../runtime/doc/xxd.1'
+   if has('win32') && !filereadable(man_page)
+     let man_page = '../../doc/xxd.1'
+   endif
+   %d
+   exe '0r ' man_page '| set ff=unix | $d | w' man_copy '| bwipe!' man_copy
+ 
    " Test 5: Print 120 bytes as continuous hexdump with 20 octets per line
    let s:test += 1
    %d
!   exe '0r! ' . s:xxd_cmd . ' -l 120 -ps -c20 ' . man_copy
    $d
    let expected = [
        \ '2e54482058584420312022417567757374203139',
***************
*** 75,85 ****
    let s:test += 1
    for arg in ['-l 13', '-l13', '-len 13']
      %d
!     exe '0r! ' . s:xxd_cmd . ' -s 0x36 ' . arg . ' -cols 13 ' . fname
      $d
      call assert_equal('00000036: 3231 7374 204d 6179 2031 3939 36  21st May 1996', getline(1), s:Mess(s:test))
    endfor
  
    " Test 7: Print C include
    let s:test += 1
    call writefile(['TESTabcd09'], 'XXDfile')
--- 81,94 ----
    let s:test += 1
    for arg in ['-l 13', '-l13', '-len 13']
      %d
!     exe '0r! ' . s:xxd_cmd . ' -s 0x36 ' . arg . ' -cols 13 ' . man_copy
      $d
      call assert_equal('00000036: 3231 7374 204d 6179 2031 3939 36  21st May 1996', getline(1), s:Mess(s:test))
    endfor
  
+   " Cleanup after tests 5 and 6
+   call delete(man_copy)
+ 
    " Test 7: Print C include
    let s:test += 1
    call writefile(['TESTabcd09'], 'XXDfile')
*** ../vim-8.1.0830/src/version.c	2019-01-27 14:29:20.724544960 +0100
--- src/version.c	2019-01-27 14:39:20.344173095 +0100
***************
*** 785,786 ****
--- 785,788 ----
  {   /* Add new patch number below this line */
+ /**/
+     831,
  /**/


-- 
MORTICIAN:    Bring out your dead!
              [clang]
              Bring out your dead!
              [clang]
              Bring out your dead!
CUSTOMER:     Here's one -- nine pence.
DEAD PERSON:  I'm not dead!
                                  The Quest for the Holy Grail (Monty Python)

 /// 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    ///