libgit2/tests-clay
Russell Belfer 97769280ba Use git_buf for path storage instead of stack-based buffers
This converts virtually all of the places that allocate GIT_PATH_MAX
buffers on the stack for manipulating paths to use git_buf objects
instead.  The patch is pretty careful not to touch the public API
for libgit2, so there are a few places that still use GIT_PATH_MAX.

This extends and changes some details of the git_buf implementation
to add a couple of extra functions and to make error handling easier.

This includes serious alterations to all the path.c functions, and
several of the fileops.c ones, too.  Also, there are a number of new
functions that parallel existing ones except that use a git_buf
instead of a stack-based buffer (such as git_config_find_global_r
that exists alongsize git_config_find_global).

This also modifies the win32 version of p_realpath to allocate whatever
buffer size is needed to accommodate the realpath instead of hardcoding
a GIT_PATH_MAX limit, but that change needs to be tested still.
2011-12-07 23:08:15 -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 Use git_buf for path storage instead of stack-based buffers 2011-12-07 23:08:15 -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 Use git_buf for path storage instead of stack-based buffers 2011-12-07 23:08:15 -08: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 Use git_buf for path storage instead of stack-based buffers 2011-12-07 23:08:15 -08:00
clay_main.c Use git_buf for path storage instead of stack-based buffers 2011-12-07 23:08:15 -08:00
clay.h Use git_buf for path storage instead of stack-based buffers 2011-12-07 23:08:15 -08: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.