patch 8.0.0615: using % with :hardcopy wrongly escapes spaces
Problem: Using % with :hardcopy wrongly escapes spaces. (Alexey Muranov)
Solution: Expand % differently. (Christian Brabandt, closes #1682)
diff --git a/src/testdir/test_hardcopy.vim b/src/testdir/test_hardcopy.vim
index ea9790d..2a316d4 100644
--- a/src/testdir/test_hardcopy.vim
+++ b/src/testdir/test_hardcopy.vim
@@ -60,3 +60,12 @@
set printoptions&
endif
endfunc
+
+func Test_fname_with_spaces()
+ 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