libgit2/tests-clar
Russell Belfer 744cc03e2b Add git_config_refresh() API to reload config
This adds a new API that allows users to reload the config if the
file has changed on disk.  A new config callback function to
refresh the config was added.

The modified time and file size are used to test if the file needs
to be reloaded (and are now stored in the disk backend object).

In writing tests, just using mtime was a problem / race, so I
wanted to check file size as well.  To support that, I extended
`git_futils_readbuffer_updated` to optionally check file size in
addition to mtime, and I added a new function `git_filebuf_stats`
to fetch the mtime and size for an open filebuf (so that the
config could be easily refreshed after a write).

Lastly, I moved some similar file checking code for attributes
into filebuf.  It is still only being used for attrs, but it
seems potentially reusable, so I thought I'd move it over.
2012-10-30 12:11:23 -07:00
..
attr index refactoring 2012-10-29 20:04:21 -05:00
buf buf: introduce git_buf_splice() 2012-10-25 17:42:35 +02:00
checkout Fix Windows build 2012-10-25 09:02:55 -07:00
clone Fix Windows build 2012-10-25 09:02:55 -07:00
commit Merge pull request #805 from nulltoken/fix/revwalk-email-parsing 2012-07-12 09:37:09 -07:00
config Add git_config_refresh() API to reload config 2012-10-30 12:11:23 -07:00
core index refactoring 2012-10-29 20:04:21 -05:00
date Omit failing test on 32-bit machines. 2012-06-06 12:39:29 -07:00
diff Add git_diff_patch_to_str API 2012-10-24 20:56:32 -07:00
index index refactoring 2012-10-29 20:04:21 -05:00
network Fetch: don't clobber received count 2012-10-29 13:34:14 -07:00
notes Update iterators for consistency across library 2012-08-03 17:08:01 -07:00
object index refactoring 2012-10-29 20:04:21 -05:00
odb revwalk: fix off-by-one error 2012-09-27 19:12:01 +02:00
pack Network progress: rename things 2012-10-24 13:29:14 -07:00
refs reflog: fix bogus removal of reflog entries 2012-10-26 21:02:01 +02:00
repo repo: enhance git_repository_state() detection 2012-10-27 16:45:59 +02:00
reset repo: enhance git_repository_state() detection 2012-10-27 16:45:59 +02:00
resources index refactoring 2012-10-29 20:04:21 -05:00
revwalk revwalk: fix off-by-one error 2012-09-27 19:12:01 +02:00
stash Merge pull request #1029 from ethomson/index_refactor 2012-10-30 11:51:58 -07:00
status index refactoring 2012-10-29 20:04:21 -05:00
submodule index refactoring 2012-10-29 20:04:21 -05:00
threads t13-threads.c ported. 2012-03-30 13:05:54 -07:00
clar Update clar and add reliable rename for Win32 2012-10-18 14:50:17 -04:00
clar_helpers.c Update clar and add reliable rename for Win32 2012-10-18 14:50:17 -04:00
clar_libgit2.h Update clar and add reliable rename for Win32 2012-10-18 14:50:17 -04:00
README.md Update README because vmg is @vmg. 2012-10-19 14:05:55 -07:00
valgrind-supp-mac.txt Fix valgrind issues and leaks 2012-08-24 11:00:27 -07:00

Writing Clar tests for libgit2

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

https://github.com/vmg/clar

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

  • Make sure you actually build the tests by setting:

      cmake -DBUILD_CLAR=ON build/
    
  • Test:

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

  • Send your pull request. That's it.