Skip to content

Commit

Permalink
Merge 46cda22 into bf27b48
Browse files Browse the repository at this point in the history
  • Loading branch information
liuchengxu authored Feb 17, 2021
2 parents bf27b48 + 46cda22 commit d004154
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Tmain/client-vista-vim-fields-expectation.d/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
If your change breaks this test case, notify the change
to https://github.com/liuchengxu/vista.vim.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0
12 changes: 12 additions & 0 deletions Tmain/client-vista-vim-fields-expectation.d/run.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Copyright: 2021 <https://github.com/liuchengxu>
# 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 $?
Empty file.
Original file line number Diff line number Diff line change
@@ -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"}
5 changes: 5 additions & 0 deletions Tmain/client-vista-vim-fields-expectation.d/test.vim
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
let s:cur_dir = fnamemodify(resolve(expand('<sfile>:p')), ':h')

function! vista#FindItemsUnderDirectory(dir) abort
return map(split(globpath(a:dir, '*'), '\n'), 'fnamemodify(v:val, '':t:r'')')
endfunction

0 comments on commit d004154

Please sign in to comment.