summaryrefslogtreecommitdiff
path: root/src/testdir/test_hardcopy.vim
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2016-01-15 15:56:35 +0100
committerBram Moolenaar <Bram@vim.org>2016-01-15 15:56:35 +0100
commitccb80989f2779c8441f7f15d160fb2141bd1676d (patch)
tree92b7ba48b5bbc92149cfff1b56881f70730e11f9 /src/testdir/test_hardcopy.vim
parent24c4d539eed33e8073f8f9fe2bee497bbba935a4 (diff)
downloadvim-ccb80989f2779c8441f7f15d160fb2141bd1676d.zip
patch 7.4.1094
Problem: Test for :hardcopy fails on MS-Windows. Solution: Check for the +postscript feature.
Diffstat (limited to 'src/testdir/test_hardcopy.vim')
-rw-r--r--src/testdir/test_hardcopy.vim18
1 files changed, 10 insertions, 8 deletions
diff --git a/src/testdir/test_hardcopy.vim b/src/testdir/test_hardcopy.vim
index c2145c13f..4629d17dd 100644
--- a/src/testdir/test_hardcopy.vim
+++ b/src/testdir/test_hardcopy.vim
@@ -45,12 +45,14 @@ endfunc
" Test that :hardcopy produces a non-empty file.
" We don't check much of the contents.
func Test_with_syntax()
- set printoptions=syntax:y
- syn on
- hardcopy > Xhardcopy
- let lines = readfile('Xhardcopy')
- call assert_true(len(lines) > 20)
- call assert_true(lines[0] =~ 'PS-Adobe')
- call delete('Xhardcopy')
- set printoptions&
+ if has('postscript')
+ set printoptions=syntax:y
+ syn on
+ hardcopy > Xhardcopy
+ let lines = readfile('Xhardcopy')
+ call assert_true(len(lines) > 20)
+ call assert_true(lines[0] =~ 'PS-Adobe')
+ call delete('Xhardcopy')
+ set printoptions&
+ endif
endfunc