Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- 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 e66b3fe
Showing
40 changed files
with
2,328 additions
and
1,099 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.