libgit2/tests-clar
Adam Roben 8e60c712ac Fix git_status_file for files that start with a character > 0x7f
git_status_file would always return GIT_ENOTFOUND for these files.

The underlying bug was that git__strcmp_cb, which is used by
git_path_with_stat_cmp to sort entries in the working directory,
compares strings based on unsigned chars (this is confirmed by the
strcmp(3) manpage), while git__prefixcmp, which is used by
workdir_iterator__entry_cmp to search for a path in the working
directory, compares strings based on char. So the sort puts this path at
the end of the list, while the search expects it to be at the beginning.

The fix was simply to make git__prefixcmp compare using unsigned chars,
just like strcmp(3). The rest of the change is just adding/updating
tests.
2012-06-07 09:50:19 -04: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 tests-clar/core: fix non-null warning 2012-05-26 14:59:07 +02:00
diff Fix git_status_file for files that start with a character > 0x7f 2012-06-07 09:50:19 -04:00
index errors: Rename error codes 2012-05-18 01:48:50 +02:00
network tests: Fix warning with nested comments 2012-06-05 22:16:08 +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 repository: make git_repository_init() value the core.ignorecase config entry 2012-06-05 22:33:34 +02:00
resources Fix git_status_file for files that start with a character > 0x7f 2012-06-07 09:50:19 -04:00
revwalk errors: Rename error codes 2012-05-18 01:48:50 +02:00
status Fix git_status_file for files that start with a character > 0x7f 2012-06-07 09:50:19 -04: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.