]> git.madduck.net Git - etc/vim.git/commitdiff

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

All patches and comments are welcome. Please squash your changes to logical commits before using git-format-patch and git-send-email to patches@git.madduck.net. If you'd read over the Git project's submission guidelines and adhered to them, I'd be especially grateful.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

Add support for "make test", automatically installing deps
authorDaniel Hahler <git@thequod.de>
Mon, 17 Nov 2014 13:11:43 +0000 (14:11 +0100)
committerHiroshi Shirosaki <h.shirosaki@gmail.com>
Wed, 9 Dec 2015 05:23:49 +0000 (14:23 +0900)
.gitignore [new file with mode: 0644]
.travis.yml
Makefile
test/README.md
test/run-tests.sh
test/vimrc

diff --git a/.gitignore b/.gitignore
new file mode 100644 (file)
index 0000000..378eac2
--- /dev/null
@@ -0,0 +1 @@
+build
index 130c2afb2e015b4c594562dbc6be856551bccc14..ce03b62d9e320f03cb9f063fc3ae6708b45cda03 100644 (file)
@@ -21,5 +21,4 @@ before_script: |
   git clone https://github.com/junegunn/vader.vim
 
 script: |
-  cd "$TRAVIS_BUILD_DIR"
-  ./test/run-tests.sh
+  make test
index d929849deacb4e2d139bfeb14d771318b309d290..3772491cdb483de7c26bb9cf564c748b551a209a 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -15,3 +15,16 @@ install:
        cp -v after/ftplugin/markdown.vim ${ADDONS}/after/ftplugin/markdown.vim
        mkdir -pv ${REGISTRY}
        cp -v registry/markdown.yaml ${REGISTRY}/markdown.yaml
+
+test: build/tabular build/vader.vim
+       test/run-tests.sh
+.PHONY: test
+
+build/tabular: | build
+       git clone https://github.com/godlygeek/tabular build/tabular
+
+build/vader.vim: | build
+       git clone https://github.com/junegunn/vader.vim build/vader.vim
+
+build:
+       mkdir build
index 1817e55768c01525424bc488084d495051f419ec..a13d6d20ae11273f9bf7fc579ffed8363df57fde 100644 (file)
@@ -1,7 +1,5 @@
-To run the tests, you must install [Vader](https://github.com/junegunn/vader.vim).
+You can run the tests using the Makefile from the top directory:
 
-Vader and other plugins must be installed in the same directory as this repository.
+    make test
 
-Run the tests with:
-
-    ./run-tests.sh
+To run them manually please refer to the instructions/commands in the Makefile.
index c8c62137ae96816135cab228aa17b66fe22e7ff4..731b3ced111f6331df20ecf9c09b32775078f168 100755 (executable)
@@ -1,3 +1,16 @@
 #!/usr/bin/env bash
 
-cd "$( dirname "${BASH_SOURCE[0]}" )" && vim -Nu vimrc -c 'Vader! *' > /dev/null
+# Exit on error.
+set -e
+
+cd "$( dirname "${BASH_SOURCE[0]}" )"
+
+for dep in ../build/tabular ../build/vader.vim; do
+  if [[ ! -d $dep ]]; then
+    echo "Missing dependency: $dep"
+    echo "You may just want to use 'make test'."
+    exit 1
+  fi
+done
+
+vim -Nu vimrc -c 'Vader! *' > /dev/null
index 44df1b6140b309adbe1c80ce40a0ac9e9714a428..59c61630f84e09bd346c93d4215a8101c52121fb 100644 (file)
@@ -1,7 +1,7 @@
 set nocompatible
 set rtp+=../
-set rtp+=../../tabular/
-set rtp+=../../vader.vim/
+set rtp+=../build/tabular/
+set rtp+=../build/vader.vim/
 filetype on
 filetype plugin on
 filetype indent on