Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.PHONY: build push test

TAG:=6
TAG:=7

build:
docker build -t testbed/vim:$(TAG) .
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ docker run -it --rm -v $PWD:/testplugin -v $PWD/test:/home "your/repository" vim
The entry point for the container is a script that runs the named Vim version.
In this case `vim74`. Arguments after the name is passed to Vim.

The entry point script prefixes your arguments with `-u /home/vimrc -i NONE`.
The entry point script prefixes your arguments with `-u /home/vimtest/vimrc -i NONE`.
They can be overridden with your arguments.

## Setup
Expand All @@ -97,8 +97,8 @@ vimrc:
source /rtp.vim
```

It will add `/home/vim` and `/home/vim/after` to the runtime path, and search
for plugins in `/home/plugins`.
It will add `/home/vimtest/vim` and `/home/vimtest/vim/after` to the runtime
path, and search for plugins in `/home/vimtest/plugins`.

### Volumes

Expand Down
12 changes: 6 additions & 6 deletions example/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ WRITABLE_HOME:=$(shell tmpdir=$$(mktemp -d --dry-run); \
echo $${tmpdir})
DOCKER = docker run -a stderr --rm \
-v $(CURDIR):/testplugin \
-v $(WRITABLE_HOME):/home \
-v $(CURDIR)/$(PLUGINS):/home/plugins "$(IMAGE)"
-v $(WRITABLE_HOME):/home/vimtest \
-v $(CURDIR)/$(PLUGINS):/home/vimtest/plugins "$(IMAGE)"

test: test-setup
docker build -f Dockerfile.tests -t "$(IMAGE)" .
Expand All @@ -29,8 +29,8 @@ test: test-setup
fi; \
for vim in "neovim-master --headless" vim-master; do \
$(DOCKER) $${vim} -u NONE \
"+py import sys; open('/home/py2', 'w').write(str(sys.version_info[0]))" \
"+py3 import sys; open('/home/py3', 'w').write(str(sys.version_info[0]))" \
"+py import sys; open('/home/vimtest/py2', 'w').write(str(sys.version_info[0]))" \
"+py3 import sys; open('/home/vimtest/py3', 'w').write(str(sys.version_info[0]))" \
'+q'; \
if [ "$$(<$(WRITABLE_HOME)/py2)" != "2" ]; then \
echo "Failed to get Python version from $${vim} (2)." >&2; exit 1; \
Expand All @@ -42,7 +42,7 @@ test: test-setup
done; \
for vim in "neovim-master --headless" vim-master; do \
$(DOCKER) $${vim} -u NONE \
"+ruby open('/home/ruby', 'w') { |f| f << 'ruby was here' }" \
"+ruby open('/home/vimtest/ruby', 'w') { |f| f << 'ruby was here' }" \
'+q'; \
if [ "$$(<$(WRITABLE_HOME)/ruby)" != "ruby was here" ]; then \
echo "Failed to get output from Ruby for $${vim}." >&2; exit 1; \
Expand All @@ -51,7 +51,7 @@ test: test-setup
done; \
for vim in "neovim-master --headless" vim-master; do \
$(DOCKER) $${vim} -u NONE \
"+lua io.open('/home/lua', 'w'):write('lua was here')" \
"+lua io.open('/home/vimtest/lua', 'w'):write('lua was here')" \
'+q'; \
if [ "$$(<$(WRITABLE_HOME)/lua)" != "lua was here" ]; then \
echo "Failed to get output from Lua for $${vim}." >&2; exit 1; \
Expand Down
4 changes: 2 additions & 2 deletions scripts/rtp.vim
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
set rtp=/home/vim,$VIM/vimfiles,$VIMRUNTIME,$VIM/vimfiles/after,/home/vim/after
execute 'set rtp+='.join(filter(split(expand('/home/plugins/*')), 'isdirectory(v:val)'), ',')
set rtp=/home/vimtest/vim,$VIM/vimfiles,$VIMRUNTIME,$VIM/vimfiles/after,/home/vimtest/vim/after
execute 'set rtp+='.join(filter(split(expand('/home/vimtest/plugins/*')), 'isdirectory(v:val)'), ',')
set rtp+=/testplugin
2 changes: 1 addition & 1 deletion scripts/run_vim.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ if ! [ -x "/vim-build/bin/$BIN" ]; then
fi

# Set default vimrc to a visible file
ARGS="-u /home/vimrc -i NONE"
ARGS="-u /home/vimtest/vimrc -i NONE"

# So we can pass the arguments to Vim as it was passed to this script
while [ $# -gt 0 ]; do
Expand Down