* Bram Moolenaar <[email protected]> [2016-02-28 14:20 +0100]:
>
> 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
Elimar
--
Do you smell something burning or is it me?
--
--
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.