summaryrefslogtreecommitdiff
path: root/tests/resources
Commit message (Collapse)AuthorAgeFilesLines
...
* | Add test for section header at end of fileCarlos Martín Nieto2011-07-051-0/+1
| | | | | | | | Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
* | Add tests for deleting a config varCarlos Martín Nieto2011-07-051-0/+1
|/ | | | Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
* Add fall-back support to the configurationCarlos Martín Nieto2011-06-171-0/+1
| | | | | | | If a config has several files, we need to check all of them before we can say that a variable doesn't exist. Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
* Add a test for overriding configCarlos Martín Nieto2011-06-172-0/+7
| | | | | | The repo's configuration should take precedence over the global one. Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
* Test replacing a valueCarlos Martín Nieto2011-06-141-0/+2
| | | | | | Add a test to check that value replacement works. Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
* Revert "threads: Fix TLS declarations"Vicent Marti2011-06-071-191/+2
| | | | This commit uploaded an old broken test. Oops!
* threads: Fix TLS declarationsVicent Marti2011-06-071-2/+191
| | | | | Cleanup the thread-utils file. Do not define TLS if libgit2 is not threadsafe.
* Tests: Added tests for git_repository_discover.Romain Geissler2011-06-051-0/+1
| | | | | Unfortunately, the across_fs flag can't be tested automaticly, as we can't create a temporary new filesystem.
* Add test for empty config fileCarlos Martín Nieto2011-05-311-0/+0
| | | | Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
* Add test for invalid ext headerCarlos Martín Nieto2011-05-311-0/+5
| | | | Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
* Add config test for empty lineCarlos Martín Nieto2011-05-311-0/+5
| | | | Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
* config: allow uppercase number suffixesCarlos Martín Nieto2011-04-191-0/+3
| | | | Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
* config: add tests for number suffixCarlos Martín Nieto2011-04-111-0/+6
| | | | Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
* Merge upstream/developmentCarlos Martín Nieto2011-04-112-0/+1
|\
| * Do not declare variables in the middle of a funcVicent Marti2011-04-081-0/+0
| |
| * refs: Fix issue when packing weak tagsVicent Marti2011-04-081-0/+1
| | | | | | | | | | Weak tags (e.g. tags that point directly to a normal object instead of a tag object) were failing to be packed.
* | Merge remote-tracking branch 'upstream/development' into configCarlos Martín Nieto2011-04-061-0/+0
|\ \ | |/
| * Fix tag reference name in testrepo.gitnulltoken2011-04-041-0/+0
| | | | | | | | | | | | | | The git test repository was holding a wrongly named tag reference ("very-simple") pointing at a tag named "e90810b". This mistake (mine :-/ ) originates back to https://github.com/libgit2/libgit2/commit/9282e92 Whole credit goes to @tclem for having spotted this.
* | config: test for a variable on its ownCarlos Martín Nieto2011-04-041-0/+3
| | | | | | | | | | | | | | If a variable is on its own, truth should be assumed. Check this is true in our code. Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
* | config: add testsCarlos Martín Nieto2011-04-044-0/+20
|/ | | | | | | These tests are basic, but they should tell us when we've broken something. Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
* Add empty bare and normal repos to test resourcesVicent Marti2011-03-2316-0/+31
| | | | We have removed the hooks folder because it takes a lot of space
* Add unit test for writing a big index fileVicent Marti2011-02-221-0/+0
| | | | Signed-off-by: Vicent Marti <tanoku@gmail.com>
* Enforced refs handling tests.nulltoken2011-02-051-0/+1
| | | | | - Added a test to ensure that a nested symbolic reference is properly resolved. - Added comparisons of object ids.
* Merge nulltoken's reference parsing codenulltoken2011-01-298-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | All the commits have been squashed into a single one before refactoring the final code, to keep everything tidy. Individual commit messages are as follows: Added repository reference looking up functionality placeholder. Added basic reference database definition and caching infrastructure. Removed useless constant. Added GIT_EINVALIDREFNAME error and description. Added missing description for GIT_EBAREINDEX. Added GIT_EREFCORRUPTED error and description. Added GIT_ETOONESTEDSYMREF error and description. Added resolving of direct and symbolic references. Prepared the packed-refs parsing. Added parsing of the packed-refs file content. When no loose reference has been found, the full content of the packed-refs file is parsed. All of the new (i.e. not previously parsed as a loose reference) references are eagerly stored in the cached references storage. The method packed_reference_file__parse() is in deer need of some refactoring. :-) Extracted to a method the parsing of the peeled target of a tag. Extracted to a method the parsing of a standard packed ref. Fixed leaky removal of the cached references. Ensured that a previously parsed packed reference isn't returned if a more up-to-date loose reference exists. Enhanced documentation of git_repository_reference_lookup(). Moved some refs related constants from repository.c to refs.h. Made parsing of a packed tag reference more robust. Updated git_repository_reference_lookup() documentation. Added some references to the test repository. Added some tests covering tag references looking up. Added some tests covering symbolic and head references looking up. Added some tests covering packed references looking up.
* Change git_repository initialization to use a pathVicent Marti2010-11-0230-2/+0
| | | | | | | | | | | | The constructor to git_repository is now called 'git_repository_open(path)' and takes a path to a git repository instead of an existing ODB object. Unit tests have been updated accordingly and the two test repositories have been merged into one. Signed-off-by: Vicent Marti <tanoku@gmail.com>
* Move test resources to a common directoryVicent Marti2010-08-1223-0/+15
| | | | | | | All the external resources used by the tests are now placed inside the common 'tests/resources' directory. Signed-off-by: Vicent Marti <tanoku@gmail.com>
* Add loading and parsing of tag objectsVicent Marti2010-08-122-0/+2
| | | | | | | | Tag objects are now properly loaded from the revision pool. New test t0801 checks for loading a parsing a series of tags, including the tag of a tag. Signed-off-by: Vicent Marti <tanoku@gmail.com>
* Add packfile readingVicent Marti2010-08-065-0/+2
Packed objects inside packfiles are now properly unpacked when calling the git_odb__read_packed() method; delta'ed objects are also properly generated when needed. A new unit test 0204-readpack tries to read a couple hundred packed objects from a standard packed repository. Signed-off-by: Vicent Marti <tanoku@gmail.com>