libgit2/tests
Russell Belfer a9528b8fdd Fix core.excludesfile named .gitignore
Ignore rules with slashes in them are matched using FNM_PATHNAME
and use the path to the .gitignore file from the root of the
repository along with the path fragment (including slashes) in
the ignore file itself.  Unfortunately, the relative path to the
.gitignore file was being applied to the global core.excludesfile
if that was also named ".gitignore".

This fixes that with more precise matching and includes test for
ignore rules with leading slashes (which were the primary example
of this being broken in the real world).

This also backports an improvement to the file context logic from
the threadsafe-iterators branch where we don't rely on mutating
the key of the attribute file name to generate the context path.
2014-04-14 15:59:48 -07:00
..
attr Fix core.excludesfile named .gitignore 2014-04-14 15:59:48 -07:00
blame Clar: skip tests 2014-04-02 18:50:47 +02: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 Clar: skip tests 2014-04-02 18:50:47 +02:00
clone remote: write tests for cloning from an empty repo 2014-04-02 20:22:22 +02: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 Fix bug with multiple iconv conversions in one dir 2014-04-07 11:45:32 -07:00
date Rename tests-clar to tests 2013-11-14 14:05:52 -08:00
diff Remove most submodule reloads from tests 2014-04-01 13:24:06 -07:00
fetchhead remote: write tests for cloning from an empty repo 2014-04-02 20:22:22 +02:00
filter Fix filter test for CRLF->LF issues 2014-02-11 19:05:52 -06:00
graph Added a no path test for git_graph_descendant_of 2014-04-08 16:32:06 +02:00
index git_checkout_opts -> git_checkout_options 2014-03-06 09:44:51 -08:00
merge Introduce git_merge_head_id 2014-03-31 11:43:38 -05:00
network remote: rename inmemory to anonymous and swap url and fetch order 2014-04-01 13:38:04 +02:00
notes note: rename the id getter to git_note_id() 2014-01-24 11:18:51 +01:00
object Add failing test for git_object_short_id 2014-03-10 11:35:14 -07:00
odb Fix a number of git_odb_exists_prefix bugs 2014-03-10 11:34:50 -07:00
online Clar: skip tests 2014-04-02 18:50:47 +02:00
pack Test cancel from indexer progress callback 2013-12-11 15:02:20 -08:00
refs reflog: follow core.logallrefupdates 2014-03-20 19:18:49 +01:00
repo Correct C90 warnings 2014-04-11 22:48:42 +02:00
reset refs: append to the HEAD reflog when updating the current branch 2014-03-17 17:47:47 +01:00
resources Merge pull request #2178 from libgit2/rb/fix-short-id 2014-03-31 23:23:32 -07:00
revert Update git_merge_tree_opts to git_merge_options 2014-03-20 09:25:08 -07:00
revwalk No need to find merge base. 2014-03-31 15:15:32 -07:00
stash Make submodules externally refcounted 2014-03-25 09:14:48 -07:00
status Fix core.excludesfile named .gitignore 2014-04-14 15:59:48 -07:00
stress Rename tests-clar to tests 2013-11-14 14:05:52 -08:00
structinit Update git_merge_tree_opts to git_merge_options 2014-03-20 09:25:08 -07:00
submodule Test (and fix) the git_submodule_sync changes 2014-04-03 11:58:51 -07: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 Fix core.excludesfile named .gitignore 2014-04-14 15:59:48 -07:00
clar_libgit2.h Fix core.excludesfile named .gitignore 2014-04-14 15:59:48 -07:00
clar.c Clar: skip tests 2014-04-02 18:50:47 +02:00
clar.h Clar: skip tests 2014-04-02 18:50:47 +02:00
generate.py Rename tests-clar to tests 2013-11-14 14:05:52 -08:00
main.c Sandbox configuration during test runs 2014-03-28 10:39:15 -07: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.