aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/functional/lua/commands_spec.lua11
1 files changed, 8 insertions, 3 deletions
diff --git a/test/functional/lua/commands_spec.lua b/test/functional/lua/commands_spec.lua
index fb55611198..cb3b436f9e 100644
--- a/test/functional/lua/commands_spec.lua
+++ b/test/functional/lua/commands_spec.lua
@@ -173,8 +173,13 @@ describe(':lua', function()
exec_lua('x = 5')
eq('5', exec_capture(':lua =x'))
eq('5', exec_capture('=x'))
+ exec_lua('x = "5"')
+ eq('"5"', exec_capture(':lua =x'))
+ eq('"5"', exec_capture('=x'))
exec_lua("function x() return 'hello' end")
- eq('hello', exec_capture(':lua = x()'))
+ eq('"hello"', exec_capture(':lua = x()'))
+ exec_lua("function x() return 'hello ' end")
+ eq('"hello "', exec_capture(':lua = x()'))
exec_lua('x = {a = 1, b = 2}')
eq('{\n a = 1,\n b = 2\n}', exec_capture(':lua =x'))
exec_lua(function()
@@ -189,14 +194,14 @@ describe(':lua', function()
eq(
dedent [[
true
- Return value]],
+ "Return value"]],
exec_capture(':lua =x(true)')
)
eq(
dedent [[
false
nil
- Error message]],
+ "Error message"]],
exec_capture('=x(false)')
)
end)