Skip to content

Commit 2791ea7

Browse files
committed
Merge remote-tracking branch 'vim/master'
2 parents 1738058 + b569079 commit 2791ea7

File tree

4 files changed

+60
-0
lines changed

4 files changed

+60
-0
lines changed

src/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1998,6 +1998,7 @@ test1 \
19981998
test_assert \
19991999
test_backspace_opt \
20002000
test_cdo \
2001+
test_hardcopy \
20012002
test_increment \
20022003
test_lispwords \
20032004
test_menu \

src/testdir/Make_all.mak

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,7 @@ SCRIPTS_GUI = test16.out
173173
# Keep test_alot.res as the last one, sort the others.
174174
NEW_TESTS = test_assert.res \
175175
test_cdo.res \
176+
test_hardcopy.res \
176177
test_increment.res \
177178
test_quickfix.res \
178179
test_viml.res \

src/testdir/test_hardcopy.vim

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
" Test :hardcopy
2+
3+
func Test_printoptions_parsing()
4+
" Only test that this doesn't throw an error.
5+
set printoptions=left:5in,right:10pt,top:8mm,bottom:2pc
6+
set printoptions=left:2in,top:30pt,right:16mm,bottom:3pc
7+
set printoptions=header:3,syntax:y,number:7,wrap:n
8+
set printoptions=duplex:short,collate:n,jobsplit:y,portrait:n
9+
set printoptions=paper:10x14
10+
set printoptions=paper:A3
11+
set printoptions=paper:A4
12+
set printoptions=paper:A5
13+
set printoptions=paper:B4
14+
set printoptions=paper:B5
15+
set printoptions=paper:executive
16+
set printoptions=paper:folio
17+
set printoptions=paper:ledger
18+
set printoptions=paper:legal
19+
set printoptions=paper:letter
20+
set printoptions=paper:quarto
21+
set printoptions=paper:statement
22+
set printoptions=paper:tabloid
23+
set printoptions=formfeed:y
24+
set printoptions=
25+
set printoptions&
26+
endfunc
27+
28+
func Test_printmbfont_parsing()
29+
" Only test that this doesn't throw an error.
30+
set printmbfont=r:WadaMin-Regular,b:WadaMin-Bold,i:WadaMin-Italic,o:WadaMin-Bold-Italic,c:yes,a:no
31+
set printmbfont=
32+
set printmbfont&
33+
endfunc
34+
35+
func Test_printheader_parsing()
36+
" Only test that this doesn't throw an error.
37+
set printheader=%<%f\ %h%m%r%=%-14.(%l,%c%V%)\ %P
38+
set printheader=%<%f%h%m%r%=%b\ 0x%B\ \ %l,%c%V\ %P
39+
set printheader=%<%f%=\ [%1*%M%*%n%R%H]\ %-19(%3l,%02c%03V%)%O'%02b'
40+
set printheader=...%r%{VarExists('b:gzflag','\ [GZ]')}%h...
41+
set printheader=
42+
set printheader&
43+
endfunc
44+
45+
" Test that :hardcopy produces a non-empty file.
46+
" We don't check much of the contents.
47+
func Test_with_syntax()
48+
set printoptions=syntax:y
49+
syn on
50+
hardcopy > Xhardcopy
51+
let lines = readfile('Xhardcopy')
52+
call assert_true(len(lines) > 20)
53+
call assert_true(lines[0] =~ 'PS-Adobe')
54+
call delete('Xhardcopy')
55+
set printoptions&
56+
endfunc

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -756,6 +756,8 @@ static char *(features[]) =
756756

757757
static int included_patches[] =
758758
{ /* Add new patch number below this line */
759+
/**/
760+
1090,
759761
/**/
760762
1089,
761763
/**/

0 commit comments

Comments
 (0)