Patch 8.0.1691
Problem:    Xxd test sometimes fails.
Solution:   Wipe out the XXDfile buffer.
Files:      src/testdir/test_xxd.vim


*** ../vim-8.0.1690/src/testdir/test_xxd.vim    2018-04-10 19:20:12.595187129 
+0200
--- src/testdir/test_xxd.vim    2018-04-10 20:04:26.451864340 +0200
***************
*** 3,13 ****
    finish
  endif
  
! func! PrepareBuffer(command)
!   %d
!   call append(0, a:command)
    $d
-   w XXDfile
  endfunc
  
  func! s:Mess(counter)
--- 3,12 ----
    finish
  endif
  
! func! PrepareBuffer(lines)
!   new
!   call append(0, a:lines)
    $d
  endfunc
  
  func! s:Mess(counter)
***************
*** 15,22 ****
  endfunc
  
  func! Test_xxd()
-   new
    call PrepareBuffer(range(1,30))
    " Test 1: simple, filter the result through xxd
    let s:test = 1
    %!$XXD %
--- 14,22 ----
  endfunc
  
  func! Test_xxd()
    call PrepareBuffer(range(1,30))
+   w XXDfile
+ 
    " Test 1: simple, filter the result through xxd
    let s:test = 1
    %!$XXD %
***************
*** 28,33 ****
--- 28,34 ----
          \ '00000040: 350a 3236 0a32 370a 3238 0a32 390a 3330  
5.26.27.28.29.30',
          \ '00000050: 0a                                       .']
    call assert_equal(expected, getline(1,'$'), s:Mess(s:test))
+ 
    " Test 2: reverse the result
    let s:test += 1
    %!$XXD -r
***************
*** 56,67 ****
--- 57,70 ----
        \ '20617574686f723a0a2e5c2220202020546f6e79',
        \ '204e7567656e74203c746f6e79407363746e7567']
    call assert_equal(expected, getline(1,'$'), s:Mess(s:test))
+ 
    " Test 6: Print the date from xxd.1
    let s:test += 1
    %d
    0r! $XXD -s 0x36 -l 13 -c 13 ../../runtime/doc/xxd.1
    $d
    call assert_equal('00000036: 3231 7374 204d 6179 2031 3939 36  21st May 
1996', getline(1), s:Mess(s:test))
+ 
    " Test 7: Print C include
    let s:test += 1
    call writefile(['TESTabcd09'], 'XXDfile')
***************
*** 72,77 ****
--- 75,81 ----
          \ '  0x54, 0x45, 0x53, 0x54, 0x61, 0x62, 0x63, 0x64, 0x30, 0x39, 
0x0a', '};',
          \ 'unsigned int XXDfile_len = 11;']
    call assert_equal(expected, getline(1,'$'), s:Mess(s:test))
+ 
    " Test 8: Print C include capitalized
    let s:test += 1
    call writefile(['TESTabcd09'], 'XXDfile')
***************
*** 82,90 ****
          \ '  0x54, 0x45, 0x53, 0x54, 0x61, 0x62, 0x63, 0x64, 0x30, 0x39, 
0x0a', '};',
          \ 'unsigned int XXDFILE_LEN = 11;']
    call assert_equal(expected, getline(1,'$'), s:Mess(s:test))
!   " Test 9: Create a  file with containing a single 'A'
    let s:test += 1
    call delete('XXDfile')
    call system('echo "010000: 41"|'.$XXD.' -r -s -0x10000 > XXDfile')
    call PrepareBuffer(readfile('XXDfile')[0])
    call assert_equal('A', getline(1), s:Mess(s:test))
--- 86,96 ----
          \ '  0x54, 0x45, 0x53, 0x54, 0x61, 0x62, 0x63, 0x64, 0x30, 0x39, 
0x0a', '};',
          \ 'unsigned int XXDFILE_LEN = 11;']
    call assert_equal(expected, getline(1,'$'), s:Mess(s:test))
! 
!   " Test 9: Create a file with containing a single 'A'
    let s:test += 1
    call delete('XXDfile')
+   bwipe! XXDfile
    call system('echo "010000: 41"|'.$XXD.' -r -s -0x10000 > XXDfile')
    call PrepareBuffer(readfile('XXDfile')[0])
    call assert_equal('A', getline(1), s:Mess(s:test))
*** ../vim-8.0.1690/src/version.c       2018-04-10 19:23:59.285563666 +0200
--- src/version.c       2018-04-10 20:05:36.623359272 +0200
***************
*** 764,765 ****
--- 764,767 ----
  {   /* Add new patch number below this line */
+ /**/
+     1691,
  /**/

-- 
hundred-and-one symptoms of being an internet addict:
152. You find yourself falling for someone you've never seen or hardly
     know, but, boy can he/she TYPE!!!!!!

 /// Bram Moolenaar -- b...@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    ///

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui