]> granicus.if.org Git - vim/commitdiff
patch 8.0.0277: the GUI test may trigger fontconfig and take a long time v8.0.0277
authorBram Moolenaar <Bram@vim.org>
Wed, 1 Feb 2017 11:08:47 +0000 (12:08 +0100)
committerBram Moolenaar <Bram@vim.org>
Wed, 1 Feb 2017 11:08:47 +0000 (12:08 +0100)
Problem:    The GUI test may trigger fontconfig and take a long time.
Solution:   Set $XDG_CACHE_HOME. (Kazunobu Kuriyama)

src/testdir/test_gui.vim
src/testdir/unix.vim
src/version.c

index d95d991ebb9bcc4c34b7880ba197df3e9d9ac073..fbea706bdfba60d07f36f4be6b03f2873f56072f 100644 (file)
@@ -10,7 +10,11 @@ func SetUp()
     set guifont=Courier\ 10\ Pitch/8/-1/5/50/0/0/0/0/0
   endif
 
-  " Gnome insists on creating $HOME/.gnome2/..
+  " Gnome insists on creating $HOME/.gnome2/, and we're going to abide by
+  " that, taking care to have the font cache work normally.
+  if $XDG_CACHE_HOME == ''
+    let $XDG_CACHE_HOME = g:tester_HOME . '/.cache'
+  endif
   call mkdir('Xhome')
   let $HOME = fnamemodify('Xhome', ':p')
 endfunc
index 36dd4e1e3b270fa0da74cb56b48e36ee1ff59258..2290ec9cbdb813f167e9cca81c6df97605a3edb2 100644 (file)
@@ -2,4 +2,9 @@
 " Always use "sh", don't use the value of "$SHELL".
 set shell=sh
 
+" While some tests overwrite $HOME to prevent them from polluting user files,
+" we need to remember the original value so that we can tell external systems
+" where to ask about their own user settings.
+let g:tester_HOME = $HOME
+
 source setup.vim
index 8aeb688a09c0892ac72fd6e77aca94888ee85d9c..3aa178691f8a62ec53c3d4c041363677140eb0da 100644 (file)
@@ -764,6 +764,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    277,
 /**/
     276,
 /**/