Patch 8.2.0388
Problem:    Printmbcharset option not tested.
Solution:   Add a test.  Enable PostScript for AppVeyor build. (Dominique
            Pelle, closes #5783)
Files:      appveyor.yml, src/testdir/test_hardcopy.vim


*** ../vim-8.2.0387/appveyor.yml        2019-02-03 13:07:39.000000000 +0100
--- appveyor.yml        2020-03-15 18:23:12.680910258 +0100
***************
*** 25,33 ****
    - cd src/testdir
      # Testing with MSVC gvim
    - path C:\Python35-x64;%PATH%
!   - nmake -f Make_dos.mak VIMPROG=..\gvim
    - nmake -f Make_dos.mak clean
      # Testing with MingW console version
!   - nmake -f Make_dos.mak VIMPROG=..\vim
  
  # vim: sw=2 sts=2 et ts=8 sr
--- 25,33 ----
    - cd src/testdir
      # Testing with MSVC gvim
    - path C:\Python35-x64;%PATH%
!   - nmake -f Make_dos.mak POSTSCRIPT=yes VIMPROG=..\gvim
    - nmake -f Make_dos.mak clean
      # Testing with MingW console version
!   - nmake -f Make_dos.mak POSTSCRIPT=yes VIMPROG=..\vim
  
  # vim: sw=2 sts=2 et ts=8 sr
*** ../vim-8.2.0387/src/testdir/test_hardcopy.vim       2020-03-09 
12:13:20.478808424 +0100
--- src/testdir/test_hardcopy.vim       2020-03-15 18:25:15.236427836 +0100
***************
*** 1,5 ****
--- 1,7 ----
  " Test :hardcopy
  
+ source check.vim
+ 
  func Test_printoptions()
    edit test_hardcopy.vim
    syn on
***************
*** 28,34 ****
          \     '']
      exe 'set printoptions=' .. opt
      if has('postscript')
!       hardcopy > Xhardcopy_printoptions
        let lines = readfile('Xhardcopy_printoptions')
        call assert_true(len(lines) > 20, opt)
        call assert_true(lines[0] =~ 'PS-Adobe', opt)
--- 30,36 ----
          \     '']
      exe 'set printoptions=' .. opt
      if has('postscript')
!       1,50hardcopy > Xhardcopy_printoptions
        let lines = readfile('Xhardcopy_printoptions')
        call assert_true(len(lines) > 20, opt)
        call assert_true(lines[0] =~ 'PS-Adobe', opt)
***************
*** 63,72 ****
    bwipe
  endfunc
  
  func Test_printexpr()
!   if !has('unix')
!     return
!   endif
  
    " Not a very useful printexpr value, but enough to test
    " hardcopy with 'printexpr'.
--- 65,98 ----
    bwipe
  endfunc
  
+ func Test_printmbcharset()
+   CheckFeature postscript
+ 
+   " digraph.txt has plenty of non-latin1 characters.
+   help digraph.txt
+   set printmbcharset=ISO10646 printencoding=utf-8 
printmbfont=r:WadaMin-Regular
+ 
+   hardcopy > Xhardcopy_printmbcharset
+   let lines = readfile('Xhardcopy_printmbcharset')
+   call assert_true(len(lines) > 20)
+   call assert_true(lines[0] =~ 'PS-Adobe')
+ 
+   set printmbcharset=does-not-exist printencoding=utf-8 
printmbfont=r:WadaMin-Regular
+   call assert_fails('hardcopy > Xhardcopy_printmbcharset', 'E456:')
+ 
+   set printmbcharset=GB_2312-80 printencoding=utf-8 
printmbfont=r:WadaMin-Regular
+   call assert_fails('hardcopy > Xhardcopy_printmbcharset', 'E673:')
+ 
+   set printmbcharset=ISO10646 printencoding=utf-8 printmbfont=
+   call assert_fails('hardcopy > Xhardcopy_printmbcharset', 'E675:')
+ 
+   call delete('Xhardcopy_printmbcharset')
+   set printmbcharset& printencoding& printmbfont&
+   bwipe
+ endfunc
+ 
  func Test_printexpr()
!   CheckFeature postscript
  
    " Not a very useful printexpr value, but enough to test
    " hardcopy with 'printexpr'.
***************
*** 84,90 ****
    \                 readfile('Xhardcopy_printexpr'))
    call delete('Xhardcopy_printexpr')
  
!   " Function return 1 to test print failure.
    function PrintFails(fname)
      call delete(a:fname)
      return 1
--- 110,116 ----
    \                 readfile('Xhardcopy_printexpr'))
    call delete('Xhardcopy_printexpr')
  
!   " Function returns 1 to test print failure.
    function PrintFails(fname)
      call delete(a:fname)
      return 1
***************
*** 97,108 ****
  endfunc
  
  func Test_errors()
!   " FIXME: Windows fails differently than Unix.
!   if has('unix')
!     edit test_hardcopy.vim
!     call assert_fails('hardcopy >', 'E324:')
!     bwipe
!   endif
  endfunc
  
  func Test_dark_background()
--- 123,133 ----
  endfunc
  
  func Test_errors()
!   CheckFeature postscript
! 
!   edit test_hardcopy.vim
!   call assert_fails('hardcopy >', 'E324:')
!   bwipe
  endfunc
  
  func Test_dark_background()
***************
*** 126,137 ****
  endfun
  
  func Test_empty_buffer()
!   " FIXME: Unclear why this fails on Windows.
!   if has('unix')
!     new
!     call assert_equal("\nNo text to be printed", execute('hardcopy'))
!     bwipe
!   endif
  endfunc
  
  func Test_printheader_parsing()
--- 151,161 ----
  endfun
  
  func Test_empty_buffer()
!   CheckFeature postscript
! 
!   new
!   call assert_equal("\nNo text to be printed", execute('hardcopy'))
!   bwipe
  endfunc
  
  func Test_printheader_parsing()
***************
*** 145,153 ****
  endfunc
  
  func Test_fname_with_spaces()
!   if !has('postscript')
!     return
!   endif
    split t\ e\ s\ t.txt
    call setline(1, ['just', 'some', 'text'])
    hardcopy > %.ps
--- 169,176 ----
  endfunc
  
  func Test_fname_with_spaces()
!   CheckFeature postscript
! 
    split t\ e\ s\ t.txt
    call setline(1, ['just', 'some', 'text'])
    hardcopy > %.ps
***************
*** 157,165 ****
  endfunc
  
  func Test_illegal_byte()
!   if !has('postscript') || &enc != 'utf-8'
      return
    endif
    new
    " conversion of 0xff will fail, this used to cause a crash
    call setline(1, "\xff")
--- 180,190 ----
  endfunc
  
  func Test_illegal_byte()
!   CheckFeature postscript
!   if &enc != 'utf-8'
      return
    endif
+ 
    new
    " conversion of 0xff will fail, this used to cause a crash
    call setline(1, "\xff")
***************
*** 168,170 ****
--- 193,197 ----
    bwipe!
    call delete('Xpstest')
  endfunc
+ 
+ " vim: shiftwidth=2 sts=2 expandtab
*** ../vim-8.2.0387/src/version.c       2020-03-15 18:15:00.150875063 +0100
--- src/version.c       2020-03-15 18:26:14.760283562 +0100
***************
*** 740,741 ****
--- 740,743 ----
  {   /* Add new patch number below this line */
+ /**/
+     388,
  /**/

-- 
hundred-and-one symptoms of being an internet addict:
270. You are subscribed to a mailing list for every piece of software
     you use.

 /// Bram Moolenaar -- [email protected] -- 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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/202003151728.02FHS9w0004193%40masaka.moolenaar.net.

Raspunde prin e-mail lui