aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2021-01-01 16:24:29 -0500
committerJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2021-01-01 16:56:25 -0500
commitfc191352e958cae0b598e4bec859b4e53034799c (patch)
tree920e2e1103e58a47c709456b47335a355b32097e
parent60855116f0acf79d74302602d910b7c2fb4dffc7 (diff)
downloadrneovim-fc191352e958cae0b598e4bec859b4e53034799c.tar.gz
rneovim-fc191352e958cae0b598e4bec859b4e53034799c.tar.bz2
rneovim-fc191352e958cae0b598e4bec859b4e53034799c.zip
vim-patch:8.2.2269: not all :hardcopy code covered by tests
Problem: Not all :hardcopy code covered by tests. Solution: Test more combinations. (Dominique Pellé, closes vim/vim#7595) https://github.com/vim/vim/commit/edc10b541b468f5f5aa2e2d5ef58a3e17e043bff
-rw-r--r--src/nvim/testdir/test_hardcopy.vim23
1 files changed, 15 insertions, 8 deletions
diff --git a/src/nvim/testdir/test_hardcopy.vim b/src/nvim/testdir/test_hardcopy.vim
index 63b4d888d7..e390bd5cc8 100644
--- a/src/nvim/testdir/test_hardcopy.vim
+++ b/src/nvim/testdir/test_hardcopy.vim
@@ -10,8 +10,10 @@ func Test_printoptions()
\ 'left:2in,top:30pt,right:16mm,bottom:3pc',
\ 'header:3,syntax:y,number:y,wrap:n',
\ 'header:3,syntax:n,number:y,wrap:y',
+ \ 'header:0,syntax:a,number:y,wrap:y',
\ 'duplex:short,collate:n,jobsplit:y,portrait:n',
\ 'duplex:long,collate:y,jobsplit:n,portrait:y',
+ \ 'duplex:off,collate:y,jobsplit:y,portrait:y',
\ 'paper:10x14',
\ 'paper:A3',
\ 'paper:A4',
@@ -46,8 +48,8 @@ func Test_printoptions()
endfunc
func Test_printmbfont()
- " Print a small help page which contains tabs to cover code that expands tabs to spaces.
- help help
+ " Print a help page which contains tabs, underlines (etc) to recover more code.
+ help syntax.txt
syn on
for opt in [':WadaMin-Regular,b:WadaMin-Bold,i:WadaMin-Italic,o:WadaMin-Bold-Italic,c:yes,a:no',
@@ -70,12 +72,17 @@ func Test_printmbcharset()
" 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=ISO10646 printencoding=utf-8
+ for courier in ['yes', 'no']
+ for ascii in ['yes', 'no']
+ exe 'set printmbfont=r:WadaMin-Regular,b:WadaMin-Bold,i:WadaMin-Italic,o:WadaMin-BoldItalic'
+ \ .. ',c:' .. courier .. ',a:' .. ascii
+ hardcopy > Xhardcopy_printmbcharset
+ let lines = readfile('Xhardcopy_printmbcharset')
+ call assert_true(len(lines) > 20)
+ call assert_true(lines[0] =~ 'PS-Adobe')
+ endfor
+ endfor
set printmbcharset=does-not-exist printencoding=utf-8 printmbfont=r:WadaMin-Regular
call assert_fails('hardcopy > Xhardcopy_printmbcharset', 'E456:')