Commit Graph

10 Commits

Author SHA1 Message Date
Jacques Germishuys
c7dd0a56bf Use p_snprintf also in tests 2014-08-05 20:51:59 +02:00
Edward Thomson
0cee70ebb7 Introduce cl_assert_equal_oid 2014-07-01 14:40:16 -04:00
Russell Belfer
8487e23797 Better search path sandboxing
There are a number of tests that modify the global or system
search paths during the tests.  This adds a helper function to
make it easier to restore those paths and makes sure that they
are getting restored in a manner that preserves test isolation.
2014-05-15 10:56:28 -07:00
Russell Belfer
0f603132bc Improve handling of fake home directory
There are a few tests that set up a fake home directory and a
fake GLOBAL search path so that we can test things in global
ignore or attribute or config files.  This cleans up that code to
work more robustly even if there is a test failure.  This also
fixes some valgrind warnings where scanning search paths for
separators could end up doing a little bit of sketchy data access
when coming to the end of search list.
2014-05-02 09:21:33 -07:00
Edward Thomson
65477db166 Handle win32 reparse points properly 2014-04-22 00:28:27 -04:00
Russell Belfer
40ed499039 Add diff threading tests and attr file cache locks
This adds a basic test of doing simultaneous diffs on multiple
threads and adds basic locking for the attr file cache because
that was the immediate problem that arose from these tests.
2014-04-17 14:43:45 -07:00
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
Russell Belfer
c8c91433a8 More ** tests for pattern rules 2014-04-06 10:42:26 -07:00
Edward Thomson
f77127da12 Tests for core.autocrlf and .gitattributes 2014-02-09 13:45:38 -08:00
Ben Straub
1782038144 Rename tests-clar to tests 2013-11-14 14:05:52 -08:00