aboutsummaryrefslogtreecommitdiff
path: root/test/functional/ex_cmds/source_spec.lua
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2022-08-23 18:12:28 +0800
committerGitHub <noreply@github.com>2022-08-23 18:12:28 +0800
commitdf4709ddf6d1ed524adae9373ecb762b9db11814 (patch)
treed65ac06e9560138c20f09d6f8269b4d9e2d29713 /test/functional/ex_cmds/source_spec.lua
parent42e9fe7d958e0ba025034c330d8e29293d828b60 (diff)
parentd459b6687704b7d1f230d0b14c0d59f87cf5f67d (diff)
downloadrneovim-df4709ddf6d1ed524adae9373ecb762b9db11814.tar.gz
rneovim-df4709ddf6d1ed524adae9373ecb762b9db11814.tar.bz2
rneovim-df4709ddf6d1ed524adae9373ecb762b9db11814.zip
Merge pull request #19905 from zeertzjq/vim-8.2.4726
vim-patch:8.2.{4726,4740,4741,4749,4841,4842}: expand('<script>')
Diffstat (limited to 'test/functional/ex_cmds/source_spec.lua')
-rw-r--r--test/functional/ex_cmds/source_spec.lua4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/functional/ex_cmds/source_spec.lua b/test/functional/ex_cmds/source_spec.lua
index 163ded43f9..cd1f43f9fd 100644
--- a/test/functional/ex_cmds/source_spec.lua
+++ b/test/functional/ex_cmds/source_spec.lua
@@ -166,6 +166,7 @@ describe(':source', function()
vim.g.sourced_lua = 1
vim.g.sfile_value = vim.fn.expand('<sfile>')
vim.g.stack_value = vim.fn.expand('<stack>')
+ vim.g.script_value = vim.fn.expand('<script>')
]])
command('set shellslash')
@@ -173,6 +174,7 @@ describe(':source', function()
eq(1, eval('g:sourced_lua'))
matches([[/test%.lua$]], meths.get_var('sfile_value'))
matches([[/test%.lua$]], meths.get_var('stack_value'))
+ matches([[/test%.lua$]], meths.get_var('script_value'))
os.remove(test_file)
end)
@@ -214,6 +216,7 @@ describe(':source', function()
"\ 2]=]
vim.g.sfile_value = vim.fn.expand('<sfile>')
vim.g.stack_value = vim.fn.expand('<stack>')
+ vim.g.script_value = vim.fn.expand('<script>')
]])
command('edit '..test_file)
@@ -223,6 +226,7 @@ describe(':source', function()
eq(' \\ 1\n "\\ 2', exec_lua('return _G.a'))
eq(':source (no file)', meths.get_var('sfile_value'))
eq(':source (no file)', meths.get_var('stack_value'))
+ eq(':source (no file)', meths.get_var('script_value'))
os.remove(test_file)
end)