libgit2/tests-clar
Russell Belfer 5dca201072 Update iterators for consistency across library
This updates all the `foreach()` type functions across the library
that take callbacks from the user to have a consistent behavior.
The rules are:

* A callback terminates the loop by returning any non-zero value
* Once the callback returns non-zero, it will not be called again
  (i.e. the loop stops all iteration regardless of state)
* If the callback returns non-zero, the parent fn returns GIT_EUSER
* Although the parent returns GIT_EUSER, no error will be set in
  the library and `giterr_last()` will return NULL if called.

This commit makes those changes across the library and adds tests
for most of the iteration APIs to make sure that they follow the
above rules.
2012-08-03 17:08:01 -07:00
..
attr Update iterators for consistency across library 2012-08-03 17:08:01 -07:00
buf Update test suite 2012-05-02 16:14:30 -07:00
commit Merge pull request #805 from nulltoken/fix/revwalk-email-parsing 2012-07-12 09:37:09 -07:00
config Update iterators for consistency across library 2012-08-03 17:08:01 -07:00
core Add git_buf_unescape and git__unescape to unescape all characters in a string (in-place) 2012-07-24 14:03:07 +02:00
date Omit failing test on 32-bit machines. 2012-06-06 12:39:29 -07:00
diff Update iterators for consistency across library 2012-08-03 17:08:01 -07:00
index Make index add/append support core.filemode flag 2012-06-19 14:27:02 -07:00
network tests: add test commit with angle brackets in the author name 2012-07-11 20:40:12 +02:00
notes Update iterators for consistency across library 2012-08-03 17:08:01 -07:00
object object: introduce git_object_peel() 2012-07-17 20:32:40 +02:00
odb Update iterators for consistency across library 2012-08-03 17:08:01 -07:00
refs Update iterators for consistency across library 2012-08-03 17:08:01 -07:00
repo Add flag to write gitlink on setting repo workdir 2012-07-10 23:19:47 -07:00
reset Add git_reset() 2012-06-07 21:27:30 +02:00
resources revparse: add reflog test data 2012-07-15 18:41:54 +02:00
revwalk revwalk: relax the parsing of the commit time 2012-07-11 20:40:12 +02:00
status Update iterators for consistency across library 2012-08-03 17:08:01 -07:00
threads t13-threads.c ported. 2012-03-30 13:05:54 -07:00
clar Fixed mode on clar 2012-05-10 11:15:37 -07:00
clar_helpers.c Make index add/append support core.filemode flag 2012-06-19 14:27:02 -07:00
clar_libgit2.h Make index add/append support core.filemode flag 2012-06-19 14:27:02 -07:00
README.md Rename the Clay test suite to Clar 2012-01-24 20:35:15 -08:00

Writing Clar tests for libgit2

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

https://github.com/tanoku/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.