Skip to content

Commit ccb8098

Browse files
committed
patch 7.4.1094
Problem: Test for :hardcopy fails on MS-Windows. Solution: Check for the +postscript feature.
1 parent 24c4d53 commit ccb8098

2 files changed

Lines changed: 12 additions & 8 deletions

File tree

src/testdir/test_hardcopy.vim

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,14 @@ endfunc
4545
" Test that :hardcopy produces a non-empty file.
4646
" We don't check much of the contents.
4747
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&
48+
if has('postscript')
49+
set printoptions=syntax:y
50+
syn on
51+
hardcopy > Xhardcopy
52+
let lines = readfile('Xhardcopy')
53+
call assert_true(len(lines) > 20)
54+
call assert_true(lines[0] =~ 'PS-Adobe')
55+
call delete('Xhardcopy')
56+
set printoptions&
57+
endif
5658
endfunc

src/version.c

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

742742
static int included_patches[] =
743743
{ /* Add new patch number below this line */
744+
/**/
745+
1094,
744746
/**/
745747
1093,
746748
/**/

0 commit comments

Comments
 (0)