libgit2/tests
Edward Thomson 956f4da897 index: test for smudged entries on write only
Test that entries are only smudged when we write the index: the
entry smudging is to prevent us from updating an index in a way
that it would be impossible to tell that an item was racy.
Consider when we load an index:  any entries that have the same
(or newer) timestamp than the index itself are considered racy,
and are subject to further scrutiny.

If we *save* that index with the same entries that we loaded,
then the index would now have a newer timestamp than the entries,
and they would no longer be given that additional scrutiny, failing
our racy detection!  So test that we smudge those entries only on
writing the new index, but that we can detect them (in diff) without
having to write.
2015-11-16 22:58:59 -05:00
..
attr attr tests: make explicit our dir/file match tests 2015-05-13 10:56:55 -04:00
blame Fix #3094 - improve use of portable size_t/ssize_t format specifiers. 2015-07-12 19:55:19 +02:00
buf buf test: cleanup memory leak 2015-02-13 09:28:12 -05:00
checkout checkout::crlf test: don't crash when no idx entry 2015-11-16 22:58:59 -05:00
cherrypick Renamed git_merge_options 'flags' to 'tree_flags' 2015-03-16 09:53:27 +02:00
clar clar: test chdir 2015-06-29 22:13:40 +00:00
clone clone::nonetwork: don't use fixed size buffer 2015-09-14 13:58:38 -04:00
commit Fix git_commit_summary to convert newlines to spaces even after 2015-11-03 17:50:55 -05:00
config config: add failing test for an external modification 2015-10-30 19:49:34 +01:00
core pool: Never return unaligned buffers 2015-11-13 04:57:19 +01:00
date Added RFC2822 date format test cases 2014-04-11 21:55:36 +02:00
describe describe: only abort without tags if fallback is not allowed. 2015-04-07 17:32:56 +02:00
diff Merge pull request #3498 from ethomson/windows_symlinks 2015-11-08 05:10:18 +01:00
fetchhead index, iterator, fetchhead: plug leaks 2015-06-26 19:00:33 +02:00
filter wildcard filters: move CHANGELOG message to 0.23+1 2015-07-10 09:53:30 -05:00
graph Added a no path test for git_graph_descendant_of 2014-04-08 16:32:06 +02:00
index index: test for smudged entries on write only 2015-11-16 22:58:59 -05:00
merge Merge pull request #3170 from CmdrMoozy/nsec_fix 2015-11-12 19:53:09 +01:00
network Tell the git_transport about the custom_headers 2015-09-08 14:02:33 -04:00
notes note: use a git_buf to return the default namespace 2015-03-17 20:50:02 +01:00
object conflict tests: use GIT_IDXENTRY_STAGE_SET 2015-05-28 09:44:22 -04:00
odb odb: Prioritize alternate backends 2015-10-14 20:53:01 +02:00
online Fix build for unit test 2015-11-02 16:19:25 -05:00
pack Silence unused return value warning 2014-09-26 12:12:09 +02:00
path win32: further cleanups for 8.3 disabling 2015-02-03 20:01:24 -05:00
perf repository: remove log message override for switching the active branch 2015-03-03 14:40:50 +01:00
rebase Fixed unused warning in tests/rebase/merge.c 2015-04-30 14:17:05 +02:00
refs reflog: error when a directory is at reflog path 2015-11-12 09:39:29 -05:00
remote remote: test insteadOf for anonymous remotes 2015-05-31 13:26:05 +02:00
repo Merge pull request #3434 from ethomson/reservednames 2015-09-21 06:01:03 +02:00
reset conflict tests: use GIT_IDXENTRY_STAGE_SET 2015-05-28 09:44:22 -04:00
resources submodule: test updating a submodule w/ a path 2015-11-04 16:53:41 -05:00
revert revert: correct test that added trailing newline 2015-07-07 17:01:49 -05:00
revwalk merge: Fix memory leak in test 2015-11-02 13:47:04 +01:00
stash stash: const up conflict params 2015-06-29 21:23:09 +00:00
status git_futils_mkdir_*: make a relative-to-base mkdir 2015-09-17 10:00:35 -04:00
stress diff: introduce binary diff callbacks 2015-06-12 09:39:20 -04:00
submodule submodule: test updating a submodule w/ a path 2015-11-04 16:53:41 -05:00
threads iterator: use an options struct instead of args 2015-08-28 18:39:47 -04:00
trace Include stacktrace summary in memory leak output. 2015-06-29 16:39:11 -04:00
transport Clean up some leaks in the test suite 2014-09-17 03:19:40 +02:00
win32 win32::longpath: don't print path 2015-09-28 16:46:09 -04:00
clar_libgit2_timer.c Converted cl_perf_timer to use git__timer internally. 2015-03-03 09:57:50 -05:00
clar_libgit2_timer.h Converted cl_perf_timer to use git__timer internally. 2015-03-03 09:57:50 -05:00
clar_libgit2_trace.c Include stacktrace summary in memory leak output. 2015-06-29 16:39:11 -04:00
clar_libgit2_trace.h Provide mechanism to let CLAR globally setup git_trace() 2015-03-02 08:20:27 -05:00
clar_libgit2.c cl_git_path_url: assert sane static buffer size 2015-09-14 14:05:01 -04:00
clar_libgit2.h git__getenv: utf-8 aware env reader 2015-07-02 16:35:43 +00:00
clar.c clar: update to 08f434d 2015-03-17 19:04:48 -04:00
clar.h Update to clar 2b73f5e 2015-02-27 00:30:50 -05:00
generate_crlf.sh crlf: script to generate expected crlf data 2015-06-22 11:59:58 -04:00
generate.py Update clar to e3985dd 2014-12-07 22:09:00 +08:00
main.c Include stacktrace summary in memory leak output. 2015-06-29 16:39:11 -04: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.