Browse Source

Add first tests

Marco Hinz 11 years ago
parent
commit
4b38f10f3f
3 changed files with 35 additions and 0 deletions
  1. 2 0
      .gitignore
  2. 10 0
      test/run
  3. 23 0
      test/tests.vader

+ 2 - 0
.gitignore

@@ -9,3 +9,5 @@
 !plugin/startify.vim
 !startify.png
 !syntax/startify.vim
+!test/run
+!test/tests.vader

+ 10 - 0
test/run

@@ -0,0 +1,10 @@
+#!/usr/bin/env bash
+
+vim --nofork -XNu <(cat << EOF
+filetype off
+set runtimepath+=~/.vim/bundle/vader.vim
+set runtimepath+=..
+filetype plugin on
+syntax enable
+set hidden
+EOF) +Vader*

+ 23 - 0
test/tests.vader

@@ -0,0 +1,23 @@
+Before (Check :Startify):
+  Startify
+
+Execute (Check options):
+  AssertEqual 'startify', &filetype
+  AssertEqual 'wipe',     &bufhidden
+  AssertEqual 'nofile',   &buftype
+  AssertEqual 0,          &buflisted
+  AssertEqual 0,          &cursorcolumn
+  AssertEqual 0,          &cursorline
+  AssertEqual 0,          &list
+  AssertEqual 0,          &number
+  AssertEqual 0,          &swapfile
+
+Do (open new buffer in insert mode with 'i'):
+  ifoo
+Expect (only "foo"):
+  foo
+
+Do (open new buffer in normal mode with 'e'):
+  eibar
+Expect (only "bar"):
+  bar