From af23d173883f47fd02a9a380c719e4428370b484 Mon Sep 17 00:00:00 2001 From: dundargoc <33953936+dundargoc@users.noreply.github.com> Date: Tue, 7 Mar 2023 04:13:04 +0100 Subject: test: move oldtests to test directory (#22536) The new oldtest directory is in test/old/testdir. The reason for this is that many tests have hardcoded the parent directory name to be 'testdir'. --- test/old/testdir/sautest/autoload/foo.vim | 15 +++++++++++++++ test/old/testdir/sautest/autoload/footest.vim | 5 +++++ test/old/testdir/sautest/autoload/globone.vim | 1 + test/old/testdir/sautest/autoload/globtwo.vim | 1 + test/old/testdir/sautest/autoload/sourced.vim | 3 +++ 5 files changed, 25 insertions(+) create mode 100644 test/old/testdir/sautest/autoload/foo.vim create mode 100644 test/old/testdir/sautest/autoload/footest.vim create mode 100644 test/old/testdir/sautest/autoload/globone.vim create mode 100644 test/old/testdir/sautest/autoload/globtwo.vim create mode 100644 test/old/testdir/sautest/autoload/sourced.vim (limited to 'test/old/testdir/sautest/autoload') diff --git a/test/old/testdir/sautest/autoload/foo.vim b/test/old/testdir/sautest/autoload/foo.vim new file mode 100644 index 0000000000..21d33a0f4d --- /dev/null +++ b/test/old/testdir/sautest/autoload/foo.vim @@ -0,0 +1,15 @@ +let g:loaded_foo_vim += 1 + +let foo#bar = {} + +func foo#bar.echo() + let g:called_foo_bar_echo += 1 +endfunc + +func foo#addFoo(head) + return a:head .. 'foo' +endfunc + +func foo#() + return 'empty' +endfunc diff --git a/test/old/testdir/sautest/autoload/footest.vim b/test/old/testdir/sautest/autoload/footest.vim new file mode 100644 index 0000000000..1e78963a10 --- /dev/null +++ b/test/old/testdir/sautest/autoload/footest.vim @@ -0,0 +1,5 @@ +" Autoload script used by test_listdict.vim, test_exists.vim and test_let.vim +let footest#x = 1 +func footest#F() + return 0 +endfunc diff --git a/test/old/testdir/sautest/autoload/globone.vim b/test/old/testdir/sautest/autoload/globone.vim new file mode 100644 index 0000000000..98c9a10582 --- /dev/null +++ b/test/old/testdir/sautest/autoload/globone.vim @@ -0,0 +1 @@ +" used by Test_globpath() diff --git a/test/old/testdir/sautest/autoload/globtwo.vim b/test/old/testdir/sautest/autoload/globtwo.vim new file mode 100644 index 0000000000..98c9a10582 --- /dev/null +++ b/test/old/testdir/sautest/autoload/globtwo.vim @@ -0,0 +1 @@ +" used by Test_globpath() diff --git a/test/old/testdir/sautest/autoload/sourced.vim b/test/old/testdir/sautest/autoload/sourced.vim new file mode 100644 index 0000000000..f69f00cb53 --- /dev/null +++ b/test/old/testdir/sautest/autoload/sourced.vim @@ -0,0 +1,3 @@ +let g:loaded_sourced_vim += 1 +func! sourced#something() +endfunc -- cgit From 7dc9182cf0b27cbfb4e289db55dd7b02998ef5c8 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Sat, 11 Mar 2023 21:29:25 +0800 Subject: vim-patch:8.2.1398: autoload script sourced twice if sourced directly (#22622) Problem: Autoload script sourced twice if sourced directly. Solution: Do not source an autoload script again. (issue vim/vim#6644) https://github.com/vim/vim/commit/daa2f36573db3e1df7eb1fdbc3a09a2815644048 Cherry-pick ret_sid changes from patch 8.2.0149. Use do_in_runtimepath() as that's what source_runtime() calls in Nvim. Co-authored-by: Bram Moolenaar --- test/old/testdir/sautest/autoload/sourced.vim | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'test/old/testdir/sautest/autoload') diff --git a/test/old/testdir/sautest/autoload/sourced.vim b/test/old/testdir/sautest/autoload/sourced.vim index f69f00cb53..aac96b11ce 100644 --- a/test/old/testdir/sautest/autoload/sourced.vim +++ b/test/old/testdir/sautest/autoload/sourced.vim @@ -1,3 +1,4 @@ let g:loaded_sourced_vim += 1 -func! sourced#something() +func sourced#something() endfunc +call sourced#something() -- cgit