Permalink
Browse files

Version 1.0.0

- Completely rewritten.  No compatibility with old versions.  - Output format is changed to Test Anything Protocol version 12.  - The style to write examples is changed.  See also |vspec-examples| for the details.  - Change the order of arguments to |bin/vspec|.  - Change the syntax for |vspec-custom-matcher| to be extensible and readable.  - Add |:Expect-not| for counter examples.  - Add |:TODO| for incomplete examples.  - Add |:SKIP| for environment-specific examples.  - Add |:before| blocks and |:after| blocks.
  • Loading branch information...
1 parent 484aa52 commit e66b3feef244d9ea5cb3e01455b36a4f55536813 Kana Natsuno committed with Jan 30, 2012
@@ -1,6 +1,6 @@
-all_files_in_repos := Makefile after/syntax/vim/vspec.vim autoload/vspec.vim bin/vspec doc/vspec.txt test/context.expected test/context.input test/custom-matcher.expected test/custom-matcher.input test/no-test.expected test/no-test.input test/syntax.expected test/syntax.input test/tools.expected test/tools.input test/typical-content.expected test/typical-content.input
+all_files_in_repos := Makefile after/indent/vim.vim after/syntax/vim/vspec.vim autoload/vspec.vim bin/vspec doc/vspec.txt t/after.vim t/before.vim t/builtin-matchers.vim t/check-vspec-result t/context.vim t/custom-matchers.vim t/error-in-describe.t t/error-in-it.t t/error-in-should-evaluating.t t/error-in-should-parsing.t t/error-in-source.t t/indent.vim t/no-hint.vim t/no-test.vim t/should.vim t/skip.t t/syntax.vim t/todo.t t/tools.vim
current_branch := master
origin_name := origin
origin_uri := ../.
repos_name := vim-vspec
-version := 0.0.4
+version := 1.0.0
View
@@ -4,7 +4,7 @@ This is a mirror of http://www.vim.org/scripts/script.php?script_id=3012
Requirements:
-- Vim 7.2 or later
+- Vim 7.3 or later
Latest version:
http://github.com/kana/vim-vspec
View
@@ -0,0 +1,48 @@
+" Vim additional indent settings: vim/vspec - indent vspec commands
+" Version: 1.0.0
+" Copyright (C) 2012 Kana Natsuno <http://whileimautomaton.net/>
+" License: So-called MIT/X license {{{
+" Permission is hereby granted, free of charge, to any person obtaining
+" a copy of this software and associated documentation files (the
+" "Software"), to deal in the Software without restriction, including
+" without limitation the rights to use, copy, modify, merge, publish,
+" distribute, sublicense, and/or sell copies of the Software, and to
+" permit persons to whom the Software is furnished to do so, subject to
+" the following conditions:
+"
+" The above copyright notice and this permission notice shall be included
+" in all copies or substantial portions of the Software.
+"
+" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+" IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+" CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+" TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+" SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+" }}}
+
+" NB: This file should be named after/indent/vim/vspec.vim, but unlike
+" $VIMRUNTIME/ftplugin.vim, $VIMRUNTIME/indent.vim does not :runtime! neither
+" indent/{filetype}_*.vim nor indent/{filetype}/*.vim.
+
+let &l:indentexpr = 'GetVimVspecIndent(' . &l:indentexpr . ')'
+
+if exists('*GetVimVspecIndent')
+ finish
+endif
+
+function GetVimVspecIndent(base_indent)
+ let indent = a:base_indent
+
+ let base_lnum = prevnonblank(v:lnum - 1)
+ let line = getline(base_lnum)
+ if 0 <= match(line, '\(^\||\)\s*\(after\|before\|describe\|it\)\>')
+ let indent += &l:shiftwidth
+ endif
+
+ return indent
+endfunction
+
+" __END__
+" vim: foldmethod=marker
@@ -1,6 +1,6 @@
" Vim additional syntax: vim/vspec - highlight vspec commands
-" Version: 0.0.4
-" Copyright (C) 2010 kana <http://whileimautomaton.net/>
+" Version: 1.0.0
+" Copyright (C) 2010-2012 Kana Natsuno <http://whileimautomaton.net/>
" License: So-called MIT/X license {{{
" Permission is hereby granted, free of charge, to any person obtaining
" a copy of this software and associated documentation files (the
@@ -22,18 +22,21 @@
" SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
" }}}
-syntax keyword vimVspecCommand It skipwhite nextgroup=vimVspecItArgument
+syntax keyword vimVspecCommand after
+syntax keyword vimVspecCommand before
+syntax keyword vimVspecCommand describe skipwhite nextgroup=vimString
+syntax keyword vimVspecCommand end
+syntax keyword vimVspecCommand Expect skipwhite
+syntax keyword vimVspecCommand it skipwhite nextgroup=vimString
+syntax keyword vimVspecOperator not skipwhite
syntax keyword vimVspecCommand ResetContext
syntax keyword vimVspecCommand SaveContext
-syntax keyword vimVspecCommand Should skipwhite nextgroup=vimFunc,vimString
-
-syntax match vimVspecItArgument /\S.*$/ contained
highlight default link vimVspecCommand vimCommand
-highlight default link vimVspecItArgument String
+highlight default link vimVspecOperator vimOper
" __END__
" vim: foldmethod=marker
Oops, something went wrong.

0 comments on commit e66b3fe

Please sign in to comment.