On Mo, 07 Sep 2015, LCD 47 wrote:
> On 7 September 2015, Christian Brabandt <[email protected]> wrote:
> > On Mo, 07 Sep 2015, LCD 47 wrote:
> >
> > > +NU ^@ 10 SH ^A 1 SX ^B 2 EX ^C 3 ET ^D 4 EQ ^E
> > > 5
> > [… digraph list]
> >
> > Isn't this list different on different systems?
>
> It shouldn't be, that's the point of setting encoding and
> termencoding.
>
> On the other hand, the exact format of the table does depend on
> &columns. This means the test will (hopefully) suceed when run as part
> of "make test", but it can fail when run out of order.
How about to remove all linebreaks before inserting the digraph table?
Then the dependence on $COLUMNS shouldn't matter.
But if I see that correctly, one also needs to check for +mbyte, since
Vims withouth +multibyte have lesser digraph table. So a :source
mbyte.vim is missing.
On the other hand, this is mostly hard coded anyhow and adding a new
digraph, will break the test, so perhaps it isn't worth the trouble
here.
> Like I said, it
> isn't a good test. Many details of the testing framework still elude my
> understanding.
There is no framework. Each test works slightly different. It's mostly
handwritten about how each author thought about testing specific details
and it can be hard to maintain.
I try to write tests in a way, that one can later modify them easily,
but they still differ between each other. Some tests make use of VimL
and those are usually either to follow than those that test some
specific results after having typed something. But they often depend on
a certain environment, options (or even the order in which they are
executed) or just some other random text within the test.
> At least, IIRC, for EBCDIC this would fail, wouldn't it? I am not
> > sure, this matters nowadays anymore.
>
> As far as I can tell EBCDIC shouldn't matter either, but I haven't
> actually tested this. I also haven't run the tests on Amiga, MS-DOS,
> VMS, OS/2, and Ming. :)
Well, if we only had a proper CI infrastructure...
> > Also I would add some special cases when testing digraphs:
> > - Test, that <c-k><space>a returns the expected value (space is special)
> > - Test, that <c-k><S-Space> returns <S-Space> as described at :h
> > i_CTRL-K
> > (S-Space will probably hard to type in the test, as this will probably
> > only work reliable in the Gui, don't know what other chars are special
> > in that context, besides the one mentioned in the help).
> > so perhaps a test is not needed for that.
> > - Test, that <C-K>a: is the same as <C-K>:a (digraphs can usually be
> > entered in any order)
> > - Test, that <C-K>=e and <C-K>Eu return the Euro sign
>
> Isn't this covered by checking the contents of the table?
At least the first 2 are not in the table. The third only has one entry
in the table in the correct order (e.g. the first, but not the second)
The fourth should be in the table.
Best,
Christian
--
Der Steuermann umgab sich gern mit Nullen. Er hielt sie für
Rettungsringe.
-- Stanislaw Jerzy Lec (eig. S. J. de Tusch-Letz)
--
--
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.