diff options
author | erw7 <erw7.github@gmail.com> | 2019-02-28 08:34:10 +0100 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2019-02-28 22:40:11 +0100 |
commit | 67535b5940b70de327d1a9ce6af4a311406eb62f (patch) | |
tree | 619ef6060c6d1d462cba715724fe4fdd246eb5be /test/functional/eval/let_spec.lua | |
parent | 900e96781f09f5e4d6b89be07391b35fcec1d1f4 (diff) | |
download | rneovim-67535b5940b70de327d1a9ce6af4a311406eb62f.tar.gz rneovim-67535b5940b70de327d1a9ce6af4a311406eb62f.tar.bz2 rneovim-67535b5940b70de327d1a9ce6af4a311406eb62f.zip |
test/env: multibyte env var to child process
Note: the test fails on non-Windows CI (Travis linux, Quickbuild bsd):
even on master before the env.c changes in this patch-series.
Maybe the unix part of printenv-test.c needs to be revisited.
Signed-off-by: Justin M. Keyes <justinkz@gmail.com>
Diffstat (limited to 'test/functional/eval/let_spec.lua')
-rw-r--r-- | test/functional/eval/let_spec.lua | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/test/functional/eval/let_spec.lua b/test/functional/eval/let_spec.lua index ff71daab74..0cbf40137e 100644 --- a/test/functional/eval/let_spec.lua +++ b/test/functional/eval/let_spec.lua @@ -7,6 +7,7 @@ local eval = helpers.eval local meths = helpers.meths local redir_exec = helpers.redir_exec local source = helpers.source +local nvim_dir = helpers.nvim_dir before_each(clear) @@ -45,7 +46,7 @@ describe(':let', function() ]=]) end) - it("multibyte environment variables", function() + it("multibyte env var #8398 #9267", function() command("let $NVIM_TEST = 'AìaB'") eq('AìaB', eval('$NVIM_TEST')) command("let $NVIM_TEST = 'AaあB'") @@ -56,4 +57,26 @@ describe(':let', function() command("let $NVIM_TEST = '"..mbyte.."'") eq(mbyte, eval('$NVIM_TEST')) end) + + it("multibyte env var to child process #8398 #9267", function() + if (not helpers.iswin()) and require('test.helpers').isCI() then + -- Fails on non-Windows CI. Buffering/timing issue? + pending('fails on unix CI', function() end) + end + local cmd_get_child_env = "let g:env_from_child = system(['"..nvim_dir.."/printenv-test', 'NVIM_TEST'])" + command("let $NVIM_TEST = 'AìaB'") + command(cmd_get_child_env) + eq(eval('$NVIM_TEST'), eval('g:env_from_child')) + + command("let $NVIM_TEST = 'AaあB'") + command(cmd_get_child_env) + eq(eval('$NVIM_TEST'), eval('g:env_from_child')) + + local mbyte = [[\p* .ม .ม .ม .ม่ .ม่ .ม่ ֹ ֹ ֹ .ֹ .ֹ .ֹ ֹֻ ֹֻ ֹֻ + .ֹֻ .ֹֻ .ֹֻ ֹֻ ֹֻ ֹֻ .ֹֻ .ֹֻ .ֹֻ ֹ ֹ ֹ .ֹ .ֹ .ֹ ֹ ֹ ֹ .ֹ .ֹ .ֹ ֹֻ ֹֻ + .ֹֻ .ֹֻ .ֹֻ a a a ca ca ca à à à]] + command("let $NVIM_TEST = '"..mbyte.."'") + command(cmd_get_child_env) + eq(eval('$NVIM_TEST'), eval('g:env_from_child')) + end) end) |