libgit2/tests-clay
Russell Belfer 309113c984 Make initial value of git_buf ptr always be a valid empty string.
Taking a page from core git's strbuf, this introduces git_buf_initbuf
which is an empty string that is used to initialize the git_buf ptr
value even for new buffers.  Now the git_buf ptr will always point to
a valid NUL-terminated string.

This change required jumping through a few hoops for git_buf_grow
and git_buf_free to distinguish between a actual allocated buffer
and the global initial value.  Also, this moves the allocation
related functions to be next to each other near the top of buffer.c.
2011-11-29 23:45:17 -08:00
..
buf clay: Merge manually @leto's tests from #485 2011-11-22 01:41:22 +01:00
config repository: Change ownership semantics 2011-11-26 08:37:08 +01:00
core Make initial value of git_buf ptr always be a valid empty string. 2011-11-29 23:45:17 -08:00
index tests-clay: remove extra semi-colon in clay_libgit2.h, add one to index/rename.c 2011-11-22 01:19:07 -06:00
network repository: Change ownership semantics 2011-11-26 08:37:08 +01:00
object Rename all _close methods 2011-11-26 08:48:00 +01:00
odb Rename all _close methods 2011-11-26 08:48:00 +01:00
repo Plug a bunch of leaks 2011-11-28 21:08:29 +01:00
status Implement p_rename 2011-11-07 20:34:27 +01:00
clay clay: Bump to 0.9.0, add TAP support 2011-11-18 01:40:35 +01:00
clay_libgit2.h Extend git_buf with new utility functions and unit tests. 2011-11-27 21:56:44 -08:00
clay_main.c clay: Add buffer tests 2011-11-29 11:36:18 +01:00
clay.h clay: Add buffer tests 2011-11-29 11:36:18 +01:00
README.md Update clay instructions to use -vtap 2011-11-18 02:35:46 +01:00

Writing Clay tests for libgit2

For information on the Clay testing framework and a detailed introduction please visit:

https://github.com/tanoku/clay

  • Write your modules and tests. Use good, meaningful names.

  • Mix the tests:

      ./clay -vtap .
    
  • Make sure you actually build the tests by setting:

      BUILD_CLAY=ON
    
  • Test:

      ./build/libgit2_clay
    
  • Make sure everything is fine.

  • Send your pull request. That's it.