vim-scripts / spec.vim--link Goto Github PK
View Code? Open in Web Editor NEWBehaviour-driven design/testing for VIM script
Home Page: http://www.vim.org/scripts/script.php?script_id=2580
Behaviour-driven design/testing for VIM script
Home Page: http://www.vim.org/scripts/script.php?script_id=2580
This is a mirror of http://www.vim.org/scripts/script.php?script_id=2580 This plugin provides a small set of commands to facilitate behaviour-driven design of vim plugins. It basically consists of two parts: spec ... BDD-related commands should ... Convenience functions for testing According to BDD theory, you are supposed to write a specification first and then make the code fulfill that specification. If you don't believe in BDD, you could also think of spec.vim as a more convenient approach to unit testing. An example specification could look like this: SpecBegin 'title': 'Foo', 'sfile': 'autoload/foo.vim' It should add numbers. Should be equal foo#Add(1, 2), 3 It should not add values of incompatible types. Should throw something 'foo#Add("1", 2)' Specification scripts basically are normal vim scripts but must be run by the |:Spec| command. :Spec[!] [PATH] Run one or more specification files. PATH can be either a file or a directory. Each specification file should contain a :SpecBegin command that defines the title, and optionally the script context, before/after commands, the contents of a scratch buffer, option sets etc. :SpecBegin [ARGUMENTS AS INNER DICTIONNARY] Establish the environment for the current specification. Known keys for ARGUMENTS: title ... The test's title. file ... The script context. before ... Code to be run before each test after ... Code to be run after each test scratch ... Run spec in scratch buffer cleanup ... A list of function names that will be removed options ... Run the spec against different option sets Examples: http://github.com/tomtom/vimtlib/tree/master/spec/
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.