Elimar Riesebieter wrote:
> [...]
>
> > > Well running this as user works as it should. So the only difference
> > > are the environment variables. My build wrapper has set LANG=C and
> > > LC_ALL=C. Setting LANG=en_US.UTF-8 and LC_ALL=en_US.UTF-8 seems to
> > > solve the issue.
> > >
> > > It looks like an UTF-8 environment is required for running the
> > > tests?
> >
> > No, but this problem does point in the direction of the conversion
> > recently added to JSON encoding/decoding.
> >
> > A simple way to try this out is to find vimconv_T in json.c. Below it
> > you will find:
> >
> > if (!enc_utf8)
> >
> > Change that to:
> >
> > if (FALSE)
> >
> > There are two of these. Let us know if that solved the problem.
>
> I applied:
>
>
> diff --git a/src/json.c b/src/json.c
>
> index bbc27b4..bea5f92 100644
> --- a/src/json.c
> +++ b/src/json.c
> @@ -84,7 +84,7 @@ write_string(garray_T *gap, char_u *str)
> vimconv_T conv;
> char_u *converted = NULL;
>
> - if (!enc_utf8)
> + if (FALSE)
> {
> conv.vc_type = CONV_NONE;
> convert_setup(&conv, p_enc, (char_u*)"utf-8");
> @@ -544,7 +544,7 @@ json_decode_string(js_read_T *reader, typval_T *res)
>
> p = reader->js_buf + reader->js_used + 1; /* skip over " */
> #if defined(FEAT_MBYTE) && defined(USE_ICONV)
> - if (!enc_utf8)
> + if (FALSE)
> {
> conv.vc_type = CONV_NONE;
> convert_setup(&conv, (char_u*)"utf-8", p_enc);
>
> The Result:
>
> Executed 33 tests
> 3 FAILED:
> Found errors in Test_js_encode():
> function Test_js_encode line 8: Expected '"s¢c¿g¿"' but got '"s¢c¿g¿"'
> Found errors in Test_json_decode():
> function Test_json_decode line 10: Expected '< ' but got 'í ¼Â '
> Found errors in Test_json_encode():
> function Test_json_encode line 8: Expected '"s¢c¿g¿"' but got '"s¢c¿g¿"'
> function Test_json_encode line 10: Expected '< ' but got 'í ¼Â '
>
>
> >From test_channel.vim:
> Found errors in Test_pipe_to_nameless_buffer():
> function Test_pipe_to_nameless_buffer line 19: Expected ['Reading from
> channel output...', 'line one', 'line two'] but got ['Reading from channel
> output...', 'line one', 'line two', 'DETACH']
>
> >From test_alot.vim:
> Found errors in Test_js_encode():
> function Test_js_encode line 8: Expected '"s¢c¿g¿"' but got '"s¢c¿g¿"'
> Found errors in Test_json_decode():
> function Test_json_decode line 10: Expected '< ' but got 'í ¼Â '
> Found errors in Test_json_encode():
> function Test_json_encode line 8: Expected '"s¢c¿g¿"' but got '"s¢c¿g¿"'
> function Test_json_encode line 10: Expected '< ' but got 'í ¼Â '
>
> Test results:
>
>
> >From test_channel.vim:
> Found errors in Test_pipe_to_nameless_buffer():
> function Test_pipe_to_nameless_buffer line 19: Expected ['Reading from
> channel output...', 'line one', 'line two'] but got ['Reading from channel
> output...', 'line one', 'line two', 'DETACH']
>
> >From test_alot.vim:
> Found errors in Test_js_encode():
> function Test_js_encode line 8: Expected '"s¢c¿g¿"' but got '"s¢c¿g¿"'
> Found errors in Test_json_decode():
> function Test_json_decode line 10: Expected '< ' but got 'í ¼Â '
> Found errors in Test_json_encode():
> function Test_json_encode line 8: Expected '"s¢c¿g¿"' but got '"s¢c¿g¿"'
> function Test_json_encode line 10: Expected '< ' but got 'í ¼Â '
> TEST FAILURE
> Makefile:41: recipe for target 'report' failed
> make[2]: *** [report] Error 1
> make[2]: Leaving directory '/source/vim/vim-7.4.1444/src/vim-basic/testdir'
> Makefile:1925: recipe for target 'test' failed
> make[1]: *** [test] Error 2
> make[1]: Leaving directory '/source/vim/vim-7.4.1444/src/vim-basic'
> debian/rules:304: recipe for target 'install-stamp-vim-basic' failed
> make: *** [install-stamp-vim-basic] Error 2
> dpkg-buildpackage: error: fakeroot debian/rules binary gave error exit status
> 2
Most of this should be fixed now. I'll change the JSON test to set
'encoding' to utf-8, otherwise the expected strings don't match, now
that they are converted to 'encoding'.
Having that DETACH show up in the test may cause flakyness. At least it
appears in the right place now, previously I have seen it appear before
the expected lines.
--
ERIC IDLE PLAYED: THE DEAD COLLECTOR, MR BINT (A VILLAGE NE'ER-DO -WELL VERY
KEEN ON BURNING WITCHES), SIR ROBIN, THE GUARD WHO DOESN'T
HICOUGH BUT TRIES TO GET THINGS STRAIGHT, CONCORDE (SIR
LAUNCELOT'S TRUSTY STEED), ROGER THE SHRUBBER (A SHRUBBER),
BROTHER MAYNARD
"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.