diff --git a/Tmain/client-vista-vim-fields-expectation.d/README.md b/Tmain/client-vista-vim-fields-expectation.d/README.md new file mode 100644 index 0000000000..bad4b81315 --- /dev/null +++ b/Tmain/client-vista-vim-fields-expectation.d/README.md @@ -0,0 +1,2 @@ +If your change breaks this test case, notify the change +to https://github.com/liuchengxu/vista.vim. diff --git a/Tmain/client-vista-vim-fields-expectation.d/exit-expected.txt b/Tmain/client-vista-vim-fields-expectation.d/exit-expected.txt new file mode 100644 index 0000000000..573541ac97 --- /dev/null +++ b/Tmain/client-vista-vim-fields-expectation.d/exit-expected.txt @@ -0,0 +1 @@ +0 diff --git a/Tmain/client-vista-vim-fields-expectation.d/run.sh b/Tmain/client-vista-vim-fields-expectation.d/run.sh new file mode 100644 index 0000000000..d70a2aab6a --- /dev/null +++ b/Tmain/client-vista-vim-fields-expectation.d/run.sh @@ -0,0 +1,12 @@ +# Copyright: 2021 +# License: GPL-2 + +CTAGS=$1 + +. ../utils.sh + +is_feature_available "${CTAGS}" json + +$CTAGS --format=2 --excmd=pattern --fields=+nksSaf --extras=+F --sort=no --append=no --extras= --language-force=vim --vim-kinds=acfvmn --output-format=json --fields=-PF -f- test.vim + +exit $? diff --git a/Tmain/client-vista-vim-fields-expectation.d/stderr-expected.txt b/Tmain/client-vista-vim-fields-expectation.d/stderr-expected.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/Tmain/client-vista-vim-fields-expectation.d/stdout-expected.txt b/Tmain/client-vista-vim-fields-expectation.d/stdout-expected.txt new file mode 100644 index 0000000000..8d30db0328 --- /dev/null +++ b/Tmain/client-vista-vim-fields-expectation.d/stdout-expected.txt @@ -0,0 +1,2 @@ +{"_type": "tag", "name": "s:cur_dir", "line": 1, "kind": "variable"} +{"_type": "tag", "name": "vista#FindItemsUnderDirectory", "line": 3, "signature": "(dir)", "kind": "function"} diff --git a/Tmain/client-vista-vim-fields-expectation.d/test.vim b/Tmain/client-vista-vim-fields-expectation.d/test.vim new file mode 100644 index 0000000000..3cdf93375a --- /dev/null +++ b/Tmain/client-vista-vim-fields-expectation.d/test.vim @@ -0,0 +1,5 @@ +let s:cur_dir = fnamemodify(resolve(expand(':p')), ':h') + +function! vista#FindItemsUnderDirectory(dir) abort + return map(split(globpath(a:dir, '*'), '\n'), 'fnamemodify(v:val, '':t:r'')') +endfunction