libgit2/tests
Rob Rix bbe13802b7 Demonstrate a trailing slash failure.
`git help ignore` has this to say about trailing slashes:

> If the pattern ends with a slash, it is removed for the purpose of
> the following description, but it would only find a match with a
> directory. In other words, foo/ will match a directory foo and
> paths underneath it, but will not match a regular file or a
> symbolic link foo (this is consistent with the way how pathspec
> works in general in Git).

Sure enough, having manually performed the same steps as this test,
`git status` tells us the following:

	# On branch master
	#
	# Initial commit
	#
	# Changes to be committed:
	#   (use "git rm --cached <file>..." to unstage)
	#
	#	new file:   force.txt
	#
	# Untracked files:
	#   (use "git add <file>..." to include in what will be committed)
	#
	#	../.gitignore
	#	child1/
	#	child2/

i.e. neither child1 nor child2 is ignored.
2014-08-08 15:19:16 -07:00
..
attr Some further sandboxing cleanups to tests 2014-05-02 09:21:33 -07:00
blame Introduce cl_assert_equal_oid 2014-07-01 14:40:16 -04:00
buf Rename tests-clar to tests 2013-11-14 14:05:52 -08:00
checkout Merge pull request #2455 from ethomson/equal_oid 2014-07-02 15:29:25 +02:00
cherrypick git_cherry_pick -> git_cherrypick 2014-07-22 10:40:23 -04:00
clar Clar: skip tests 2014-04-02 18:50:47 +02:00
clone Handle local file:/// paths on Windows 2014-07-11 18:46:00 -04:00
commit Introduce cl_assert_equal_oid 2014-07-01 14:40:16 -04:00
config Add unit test to test add section without lf at EOF 2014-07-16 21:54:53 +08:00
core Round up pool alloc sizes for alignment 2014-06-30 12:05:25 -07:00
date Added RFC2822 date format test cases 2014-04-11 21:55:36 +02:00
diff Introduce cl_assert_equal_oid 2014-07-01 14:40:16 -04:00
fetchhead Introduce cl_assert_equal_oid 2014-07-01 14:40:16 -04:00
filter Ignore core.safecrlf=warn until we have a warn infrastructure 2014-05-30 11:30:53 -05:00
graph Added a no path test for git_graph_descendant_of 2014-04-08 16:32:06 +02:00
index Introduce cl_assert_equal_oid 2014-07-01 14:40:16 -04:00
merge Merge pull request #2455 from ethomson/equal_oid 2014-07-02 15:29:25 +02:00
network refspec: support asterisks in the middle of a pattern 2014-07-04 18:00:20 +02:00
notes Introduce cl_assert_equal_oid 2014-07-01 14:40:16 -04:00
object Introduce cl_assert_equal_oid 2014-07-01 14:40:16 -04:00
odb Introduce cl_assert_equal_oid 2014-07-01 14:40:16 -04:00
online ssh: provide a factory function for setting ssh paths 2014-07-07 14:51:51 +02:00
pack Introduce cl_assert_equal_oid 2014-07-01 14:40:16 -04:00
refs Use p_snprintf also in tests 2014-08-05 20:51:59 +02:00
repo Don't report status on named pipes 2014-08-08 13:17:50 -07:00
reset Reset tests: Use sandboxed index 2014-04-25 15:49:58 +02:00
resources Merge pull request #2261 from jacquesg/format-patch 2014-04-16 19:09:35 +02:00
revert Capture conflict information in MERGE_MSG for revert and merge 2014-04-14 16:16:22 +02:00
revwalk revwalk::simplify test should test 2014-07-01 14:40:16 -04:00
stash Introduce cl_assert_equal_oid 2014-07-01 14:40:16 -04:00
status Demonstrate a trailing slash failure. 2014-08-08 15:19:16 -07:00
stress Use p_snprintf also in tests 2014-08-05 20:51:59 +02:00
structinit Fix remaining init_options inconsistencies 2014-05-02 09:21:33 -07:00
submodule Merge pull request #2407 from libgit2/cmn/remote-rename-more 2014-06-08 16:44:32 +02:00
threads Use p_snprintf also in tests 2014-08-05 20:51:59 +02:00
trace Remove trace / add git_diff_perfdata struct + api 2014-05-02 09:21:33 -07:00
clar_libgit2.c Switch description and path reporting 2014-07-15 10:00:46 -04:00
clar_libgit2.h Use p_snprintf also in tests 2014-08-05 20:51:59 +02: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 Better search path sandboxing 2014-05-15 10:56:28 -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.