libgit2/tests
Russell Belfer 8949907887 Fix a number of git_odb_exists_prefix bugs
The git_odb_exists_prefix API was not dealing correctly when a
later backend returned GIT_ENOTFOUND even if an earlier backend
had found the object.

Additionally, the unit tests were not properly exercising the API
and had a couple mistakes in checking the results.

Lastly, since the backends are not expected to behavior correctly
unless all bytes of the short id are zero except for the prefix,
this makes the ODB prefix APIs explicitly clear out the extra
bytes so the user doesn't have to be as careful.
2014-03-10 11:34:50 -07:00
..
attr index: rename an entry's id to 'id' 2014-01-25 08:15:44 +01:00
blame Merge pull request #2137 from jru/blame-first-parent 2014-02-26 16:58:20 -05:00
buf Rename tests-clar to tests 2013-11-14 14:05:52 -08:00
checkout git_checkout_opts -> git_checkout_options 2014-03-06 09:44:51 -08:00
clar Update to latest clar 2014-01-31 13:44:09 -08:00
clone Merge pull request #2028 from libgit2/options-names 2014-03-07 19:02:58 +01:00
commit Fix reflog message when creating commits 2014-02-04 15:32:57 -08:00
config Remove converting user error to GIT_EUSER 2013-12-11 10:57:49 -08:00
core features: Rename _HAS_ to _FEATURE_ 2014-03-03 12:40:25 +01:00
date Rename tests-clar to tests 2013-11-14 14:05:52 -08:00
diff git_checkout_opts -> git_checkout_options 2014-03-06 09:44:51 -08:00
fetchhead Rename tests-clar to tests 2013-11-14 14:05:52 -08:00
filter Fix filter test for CRLF->LF issues 2014-02-11 19:05:52 -06:00
graph Add git_graph_descendant_of. 2014-01-28 19:39:14 +01:00
index git_checkout_opts -> git_checkout_options 2014-03-06 09:44:51 -08:00
merge git_checkout_opts -> git_checkout_options 2014-03-06 09:44:51 -08:00
network Correct default reflog message for git_remote_fetch 2014-02-06 11:18:10 -08:00
notes note: rename the id getter to git_note_id() 2014-01-24 11:18:51 +01:00
object Add git_object_short_id API to get short id string 2014-03-04 16:23:28 -08:00
odb Fix a number of git_odb_exists_prefix bugs 2014-03-10 11:34:50 -07:00
online git_checkout_opts -> git_checkout_options 2014-03-06 09:44:51 -08:00
pack Test cancel from indexer progress callback 2013-12-11 15:02:20 -08:00
refs Merge pull request #2144 from linquize/branch-f-current 2014-03-02 09:00:00 -06:00
repo Move system directory cache out of utils 2014-02-24 17:52:38 -08:00
reset Plug a few leaks in the tests 2014-03-07 16:03:15 +01:00
resources Add PHP tests and fix bug in PHP builtin driver 2014-01-27 14:57:03 -08:00
revert git_revert_opts -> git_revert_options 2014-03-06 09:44:52 -08:00
revwalk revwalk: add a test for pushing all references 2014-02-05 12:16:44 +01:00
stash Remove ignored files from the working directory if they were stashed 2014-03-04 12:22:27 +02:00
status Add reflog params to set-head calls 2014-01-30 15:51:00 -08:00
stress Rename tests-clar to tests 2013-11-14 14:05:52 -08:00
structinit git_revert_opts -> git_revert_options 2014-03-06 09:44:52 -08:00
submodule Make submodule fetchRecurse match other options 2014-01-30 09:59:59 -08:00
threads refs: remove the _with_log differentiation 2014-01-15 13:32:43 +01:00
trace Rename tests-clar to tests 2013-11-14 14:05:52 -08:00
clar_libgit2.c Tests for core.autocrlf and .gitattributes 2014-02-09 13:45:38 -08:00
clar_libgit2.h Tests for core.autocrlf and .gitattributes 2014-02-09 13:45:38 -08:00
clar.c Update clar to e1990d6 2014-03-07 10:53:00 -08:00
clar.h Update clar to e1990d6 2014-03-07 10:53:00 -08:00
generate.py Rename tests-clar to tests 2013-11-14 14:05:52 -08:00
main.c Rename tests-clar to tests 2013-11-14 14:05:52 -08:00
README.md Rename tests-clar to tests 2013-11-14 14:05:52 -08:00
valgrind-supp-mac.txt Test cancel from indexer progress callback 2013-12-11 15:02:20 -08: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.