libgit2/tests-clar
Russell Belfer 2a99df6909 Fix bugs for status with spaces and reloaded attrs
This fixes two bugs:

* Issue #728 where git_status_file was not working for files
  that contain spaces.  This was caused by reusing the "fnmatch"
  parsing code from ignore and attribute files to interpret the
  "pathspec" that constrained the files to apply the status to.
  In that code, unescaped whitespace was considered terminal to
  the pattern, so a file with internal whitespace was excluded
  from the matched files.  The fix was to add a mode to that code
  that allows spaces and tabs inside patterns.  This mode only
  comes into play when parsing in-memory strings.

* The other issue was undetected, but it was in the recently
  added code to reload gitattributes / gitignores when they were
  changed on disk.  That code was not clearing out the old values
  from the cached file content before reparsing which meant that
  newly added patterns would be read in, but deleted patterns
  would not be removed.  The fix was to clear the vector of
  patterns in a cached file before reparsing the file.
2012-05-24 17:14:56 -07:00
..
attr Fix bugs for status with spaces and reloaded attrs 2012-05-24 17:14:56 -07:00
buf Update test suite 2012-05-02 16:14:30 -07:00
commit errors: Rename the generic return codes 2012-05-18 01:26:26 +02:00
config errors: Rename error codes 2012-05-18 01:48:50 +02:00
core Fix bugs for status with spaces and reloaded attrs 2012-05-24 17:14:56 -07:00
diff Ranged iterators and rewritten git_status_file 2012-05-15 14:34:15 -07:00
index errors: Rename error codes 2012-05-18 01:48:50 +02:00
network errors: Rename error codes 2012-05-18 01:48:50 +02:00
notes errors: Rename error codes 2012-05-18 01:48:50 +02:00
object errors: Rename error codes 2012-05-18 01:48:50 +02:00
odb clar: Fix warning 2012-05-16 19:24:35 +02:00
refs Merge pull request #710 from libgit2/breaking-changes 2012-05-18 13:53:38 -07:00
repo errors: Rename error codes 2012-05-18 01:48:50 +02:00
resources Fix status for files under ignored dirs 2012-05-16 17:08:59 -07:00
revwalk errors: Rename error codes 2012-05-18 01:48:50 +02:00
status Fix bugs for status with spaces and reloaded attrs 2012-05-24 17:14:56 -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 compat: make p_open able to accept optional mode when passing the O_CREAT flag 2012-05-07 12:18:54 +02:00
clar_libgit2.h clar helper: don't dereference giterr_last() if it's NULL 2012-05-07 11:29:10 +02: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.