Skip to content

Commit 4854383

Browse files
committed
🚧 working: Fix test files
1 parent bb6e0e9 commit 4854383

File tree

7 files changed

+37
-55
lines changed

7 files changed

+37
-55
lines changed

‎.gitignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
cache/
1+
test/cache/*
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,13 @@
1-
if &compatible
2-
set nocompatible
3-
endif
1+
set nocompatible
42

5-
let s:cache = expand('%:p:h') .. '/cache/dein'
3+
let s:cache = expand('<sfile>:p:h') .. '/cache/dein'
64
let s:repo_dir = s:cache .. '/repos/github.com/Shougo/dein.vim'
75
let g:readme_viewer#plugin_manager = 'dein.vim'
86

97
if &runtimepath !~# s:cache
108
if !isdirectory(s:repo_dir)
11-
call system('git clone https://github.com/Shougo/dein.vim '
12-
\ .. s:repo_dir)
9+
execute '!git clone https://github.com/Shougo/dein.vim'
10+
\ '--depth 1' s:repo_dir
1311
endif
1412
execute 'set runtimepath^=' .. s:repo_dir
1513
endif
@@ -20,10 +18,3 @@ call dein#add('Shougo/dein.vim')
2018
call dein#add('4513ECHO/vim-readme-viewer')
2119

2220
call dein#end()
23-
24-
filetype plugin indent on
25-
syntax enable
26-
27-
if dein#check_install()
28-
call dein#install()
29-
endif
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,13 @@
1-
if &compatible
21
set nocompatible
3-
endif
42

5-
let s:cache = expand('%:p:h') .. '/cache/minpac'
3+
let s:cache = expand('<sfile>:p:h') .. '/cache/minpac'
64
let s:repo_dir = s:cache .. '/pack/minpac/opt/minpac'
75
let g:readme_viewer#plugin_manager = 'minpac'
86

97
if &packpath !~# s:cache
108
if !isdirectory(s:repo_dir)
11-
call system('git clone https://github.com/k-takata/minpac '
12-
\ .. s:repo_dir)
9+
execute '!git clone https://github.com/k-takata/minpac'
10+
\ '--depth 1' s:repo_dir
1311
endif
1412
execute 'set packpath^=' .. s:cache
1513
endif
@@ -22,7 +20,3 @@ call minpac#add('k-takata/minpac', {'type': 'opt'})
2220
call minpac#add('4513ECHO/vim-readme-viewer')
2321

2422
packloadall
25-
filetype plugin indent on
26-
syntax enable
27-
28-
call minpac#update()

‎test/packer.vimrc

-26
This file was deleted.

‎test/packer/test.vimrc

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
set nocompatible
2+
3+
let s:cache = expand('<sfile>:p:h') .. '/cache/packer'
4+
let s:repo_dir = s:cache .. '/pack/packer/opt/packer.nvim'
5+
let g:readme_viewer#plugin_manager = 'packer.nvim'
6+
7+
if &packpath !~# s:cache
8+
if !isdirectory(s:repo_dir)
9+
execute '!git clone https://github.com/wbthomason/packer.nvim'
10+
\ '--depth 1' s:repo_dir
11+
endif
12+
execute 'set packpath^=' .. s:cache
13+
endif
14+
15+
lua << ENDLUA
16+
vim.cmd [[packadd packer.nvim]]
17+
18+
return require('packer').startup(function(use)
19+
use { 'wbthomason/packer.nvim', opt = true }
20+
use '4513ECHO/vim-readme-viewer'
21+
end)
22+
ENDLUA
23+

‎test/plug.vimrc ‎test/plug/test.vimrc

+3-6
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,14 @@
1-
if &compatible
2-
set nocompatible
3-
endif
1+
set nocompatible
42

5-
let s:cache = expand('%:p:h') .. '/cache/plug'
3+
let s:cache = expand('<sfile>:p:h') .. '/cache/plug'
64
let s:repo_file = s:cache .. '/autoload/plug.vim'
75
let g:readme_viewer#plugin_manager = 'vim-plug'
86

97

108
if &runtimepath !~# s:cache
119
if !filereadable(s:repo_file)
12-
call system('curl -fL --create-dirs ' ..
10+
execute '!curl -fL --create-dirs -o' s:repo_file
1311
\ 'https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim'
14-
\ .. ' -o ' .. s:repo_file)
1512
endif
1613
execute 'set runtimepath^=' .. s:cache
1714
endif

‎test/test.vim

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
let s:root = expand('<sfile>:p:h')
2+
let s:tasks = json_decode(join(readfile(s:root .. '/tasks.json')))
3+

0 commit comments

Comments
 (0)