aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/testdir
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2018-07-20 03:56:13 +0200
committerGitHub <noreply@github.com>2018-07-20 03:56:13 +0200
commit5ff90a100a2af99ee4236995bef221a41eb2f643 (patch)
treee148eee290c30ee7b7537d0f686b00b321aa9534 /src/nvim/testdir
parentf5d7123f6c33744502a3446b9f10cc7c6b969b19 (diff)
parent588e86bda668f34ef75193f367f80d967ff3ad92 (diff)
downloadrneovim-5ff90a100a2af99ee4236995bef221a41eb2f643.tar.gz
rneovim-5ff90a100a2af99ee4236995bef221a41eb2f643.tar.bz2
rneovim-5ff90a100a2af99ee4236995bef221a41eb2f643.zip
Merge #8761 from janlazo/vim-8.0.1503
Diffstat (limited to 'src/nvim/testdir')
-rw-r--r--src/nvim/testdir/test_hardcopy.vim29
1 files changed, 22 insertions, 7 deletions
diff --git a/src/nvim/testdir/test_hardcopy.vim b/src/nvim/testdir/test_hardcopy.vim
index f630556bef..ced13b107c 100644
--- a/src/nvim/testdir/test_hardcopy.vim
+++ b/src/nvim/testdir/test_hardcopy.vim
@@ -63,12 +63,27 @@ func Test_with_syntax()
endfunc
func Test_fname_with_spaces()
- if has('postscript')
- split t\ e\ s\ t.txt
- call setline(1, ['just', 'some', 'text'])
- hardcopy > %.ps
- call assert_true(filereadable('t e s t.txt.ps'))
- call delete('t e s t.txt.ps')
- bwipe!
+ if !has('postscript')
+ return
+ endif
+ split t\ e\ s\ t.txt
+ call setline(1, ['just', 'some', 'text'])
+ hardcopy > %.ps
+ call assert_true(filereadable('t e s t.txt.ps'))
+ call delete('t e s t.txt.ps')
+ bwipe!
+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")
+ hardcopy >Xpstest
+
+ bwipe!
+ call delete('Xpstest')
endfunc
+