Kazunobu Kuriyama wrote:
> > Dominique wrote:
> >
> > > Bram Moolenaar wrote:
> > >
> > > > Patch 8.0.0329
> > > > Problem: Xfontset and guifontwide are not tested.
> > > > Solution: Add tests. (Kazunobu Kuriyama)
> > > > Files: src/testdir/test_gui.vim
> > >
> > > A test introduced by above patch fails when I configure vim-8.0.329 with:
> > >
> > > $ configure --with-features=huge --enable-gui=motif
> > >
> > > ===
> > > Test results:
> > >
> > >
> > > >From test_gui.vim:
> > > Found errors in Test_set_guifontset():
> > > Caught exception in Test_set_guifontset(): Vim(language):E197: Cannot
> > > set language to "ja_JP.eucJP" @ function
> > > RunTheTest[21]..Test_set_guifontset, line 13
> > > TEST FAILURE
> > > make: *** [report] Error 1
> > > ===
> > >
> > > With --enable-gui=gtk2, all tests pass.
> > >
> > > Line 13 in Test_set_guifontset is:
> > >
> > > language ctype ja_JP.eucJP
> > >
> > > I don't have time to investigate now. Maybe it happens because
> > > I don't have the Japanese locale installed. Or maybe it's a limitation
> > > of the Motif GUI, since all tests pass when using the gtk2 GUI.
> >
> > It might be that this just doesn't always work. We could put a
> > try/catch around it and ignore the error if it's E197.
> >
>
> OK, I wrote a patch along that line. Please have a look at the patch
> attached.
>
> I actually like the suggested idea because it definitely makes my life
> easier :)
>
> The patch also includes some improvements and changes in preparation for
> the script's getting larger in the feature.
Thanks. I find the solution with the array of messages a bit too much.
Why not have some script-local variables for the messages?
let s:skip_for_wrong_gui = 'Skipped: wrong gui'
let s:skip_for_another_reason = 'Skipped: another reason'
func Test_something()
let skipped = ''
if wrong gui
let skipped = l:skip_for_wrong_gui
else
try
something
catch
let skipped = sk:skip_for_another_reason
endtry
endif
if skipped
throw skipped
endif
Something like that.
--
ARTHUR: Now stand aside worthy adversary.
BLACK KNIGHT: (Glancing at his shoulder) 'Tis but a scratch.
ARTHUR: A scratch? Your arm's off.
"Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.