]> 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 unit tests and travis support.
authorCiro Santilli <ciro.santilli@gmail.com>
Sun, 7 Sep 2014 15:54:58 +0000 (17:54 +0200)
committerCiro Santilli <ciro.santilli@gmail.com>
Wed, 17 Sep 2014 19:49:57 +0000 (21:49 +0200)
.travis.yml [new file with mode: 0644]
CONTRIBUTING.md
README.md
test/README.md [new file with mode: 0644]
test/run-tests.sh [new file with mode: 0755]
test/syntax.vader [new file with mode: 0644]
test/vimrc [new file with mode: 0644]

diff --git a/.travis.yml b/.travis.yml
new file mode 100644 (file)
index 0000000..12bf12e
--- /dev/null
@@ -0,0 +1,12 @@
+language: vim
+
+install: |
+  sudo apt-get update
+  sudo apt-get install vim
+  cd ..
+  git clone https://github.com/godlygeek/tabular
+  git clone https://github.com/junegunn/vader.vim
+
+script: |
+  cd "$TRAVIS_BUILD_DIR"
+  ./test/run-tests.sh
index 7a603db37fee283d38461892640cebab5c8f0880..b29b8cc752ff828929801ea386f082b132355daf 100644 (file)
@@ -36,12 +36,4 @@ If you wish to have a behavior that differs from that style guide, add an option
 
 # Tests
 
-All new features must have tests. We don't require unit tests: tests that require users to open markdown code in Vim and check things manually are accepted, but you should point clearly to where the tests are.
-
-Wherever possible, use test cases from the [karlcow's Markdown Test Suite](https://github.com/karlcow/markdown-testsuite), and link to the relevant test files on your merge request.
-
-If a test does not exist there yet, make a pull request to them, and link to that pull request on the pull request you make here.
-
-If the test you want to do is not appropriate for the Markdown Test Suite, create it only under the `test/` directory here.
-
-If we start disagreeing too often on what is appropriate or not, we will fork off that repository.
+All new features must have unit tests.
index 18044db9d042181c4871062592ec5f78936dfefa..8ff3b59c47d364743fecc09d989ef98f695a778a 100644 (file)
--- a/README.md
+++ b/README.md
@@ -1,5 +1,7 @@
 # Markdown Vim Mode
 
+[![Build Status](https://travis-ci.org/plasticboy/vim-markdown.svg)](https://travis-ci.org/plasticboy/vim-markdown)
+
 Syntax highlighting, matching rules and mappings for [the original Markdown](http://daringfireball.net/projects/markdown/) and extensions.
 
 ## Installation
diff --git a/test/README.md b/test/README.md
new file mode 100644 (file)
index 0000000..1817e55
--- /dev/null
@@ -0,0 +1,7 @@
+To run the tests, you must install [Vader](https://github.com/junegunn/vader.vim).
+
+Vader and other plugins must be installed in the same directory as this repository.
+
+Run the tests with:
+
+    ./run-tests.sh
diff --git a/test/run-tests.sh b/test/run-tests.sh
new file mode 100755 (executable)
index 0000000..c8c6213
--- /dev/null
@@ -0,0 +1,3 @@
+#!/usr/bin/env bash
+
+cd "$( dirname "${BASH_SOURCE[0]}" )" && vim -Nu vimrc -c 'Vader! *' > /dev/null
diff --git a/test/syntax.vader b/test/syntax.vader
new file mode 100644 (file)
index 0000000..9d2e866
--- /dev/null
@@ -0,0 +1,11 @@
+Given mkd (bold);
+**bold** not bold
+
+Execute (SyntaxOf(pattern)):
+  AssertEqual SyntaxOf('b'), 'htmlBold'
+
+Given mkd (italic);
+*italic*
+
+Execute (SyntaxOf(pattern)):
+  AssertEqual SyntaxOf('i'), 'htmlItalic'
diff --git a/test/vimrc b/test/vimrc
new file mode 100644 (file)
index 0000000..86020ed
--- /dev/null
@@ -0,0 +1,8 @@
+set nocompatible
+set rtp+=../
+set rtp+=../../tabular/
+set rtp+=../../vader.vim/
+filetype on
+filetype plugin on
+filetype indent on
+syntax on