summaryrefslogtreecommitdiff
path: root/tests-clar/config
Commit message (Collapse)AuthorAgeFilesLines
...
* remote: introduce git_remote_rename()nulltoken2012-10-252-0/+20
|
* branch: remove config section upon deletionnulltoken2012-10-252-0/+26
|
* Add config level support in the config APIyorah2012-10-236-63/+292
| | | | | | | Added `struct git_config_entry`: a git_config_entry contains the key, the value, and the config file level from which a config element was found. Added `git_config_open_level`: build a single-level focused config object from a multi-level one. We are now storing `git_config_entry`s in the khash of the config_file
* Fix adding variable to config file with no trailing newlineyorah2012-10-231-0/+18
| | | | This can occur after a manual modification of a config file.
* Fix config parser boundary logicRussell Belfer2012-08-121-0/+16
| | | | | | The config file parser was not working right if there was no whitespace between the value name and the equals sign. This fixes that.
* Update iterators for consistency across libraryRussell Belfer2012-08-031-1/+1
| | | | | | | | | | | | | | | | | This updates all the `foreach()` type functions across the library that take callbacks from the user to have a consistent behavior. The rules are: * A callback terminates the loop by returning any non-zero value * Once the callback returns non-zero, it will not be called again (i.e. the loop stops all iteration regardless of state) * If the callback returns non-zero, the parent fn returns GIT_EUSER * Although the parent returns GIT_EUSER, no error will be set in the library and `giterr_last()` will return NULL if called. This commit makes those changes across the library and adds tests for most of the iteration APIs to make sure that they follow the above rules.
* tests: plug a leak in the config stressCarlos Martín Nieto2012-07-211-0/+1
|
* config: escape subsection names when creating themCarlos Martín Nieto2012-07-211-0/+22
| | | | | | This allows us to set options like "some.foo\\ish.var". This closes #830
* Adding git_config_foreach_match() iteration fnRussell Belfer2012-07-101-0/+75
| | | | | | | | | | | | | | Adding a new config iteration function that let's you iterate over just the config entries that match a particular regular expression. The old foreach becomes a simple use of this with an empty pattern. This also fixes an apparent bug in the existing `git_config_foreach` where returning a non-zero value from the iteration callback was not correctly aborting the iteration and the returned value was not being propogated back to the caller of foreach. Added to tests to cover all these changes.
* config: add more tests for writing escaped charsCarlos Martín Nieto2012-06-131-0/+29
|
* Add a test that shows we don't preserve quotes in config valuesAdam Roben2012-06-131-0/+17
|
* errors: Rename error codesbreaking-changesVicent Martí2012-05-181-2/+2
|
* errors: Rename the generic return codesVicent Martí2012-05-182-4/+4
|
* global: Fix unit tests after reorderingVicent Martí2012-05-185-40/+40
|
* Update test suiteVicent Martí2012-05-022-8/+8
|
* Merge branch 'new-error-handling' into developmentVicent Martí2012-05-022-1/+35
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .travis.yml include/git2/diff.h src/config_file.c src/diff.c src/diff_output.c src/mwindow.c src/path.c tests-clar/clar_helpers.c tests-clar/object/tree/frompath.c tests/t00-core.c tests/t03-objwrite.c tests/t08-tag.c tests/t10-refs.c tests/t12-repo.c tests/t18-status.c tests/test_helpers.c tests/test_main.c
| * config: also allow escaping outside of a quoted stringCarlos Martín Nieto2012-04-251-0/+12
| | | | | | | | This limitation was a misparsing of the documentation.
| * config: parse quoted valuesCarlos Martín Nieto2012-04-161-0/+22
| | | | | | | | | | Variable values may be quoted to include newlines, literal quotes and other characters. Add support for these and test it.
| * error-handling: ReferencesVicent Martí2012-03-061-1/+1
| | | | | | | | | | Yes, this is error handling solely for `refs.c`, but some of the abstractions leak all ofer the code base.
* | Discovered cl_git_strequal! Mounted a crusade!Ben Straub2012-03-313-9/+9
| |
* | config: write out section headers with subsections correctlyCarlos Martín Nieto2012-03-091-0/+15
|/ | | | | | | | | | write_section() mistakenly treated is input as the whole variable name instead of simply the section (and possibly subsection) and would confuse "section.subsection" as a section plus variable name and produce a wrong section header. Fix this and include a test for writing "section.subsection.var" and reading it from the file.
* Fixing memory leaks indicated by valgrindRussell Belfer2012-03-021-0/+3
| | | | | This clears up the memory leaks that valgrind seems to find on my machine.
* Clean up GIT_UNUSED macros on all platformsRussell Belfer2012-03-021-2/+6
| | | | | | | | | | | | | | | | | | | It turns out that commit 31e9cfc4cbcaf1b38cdd3dbe3282a8f57e5366a5 did not fix the GIT_USUSED behavior on all platforms. This commit walks through and really cleans things up more thoroughly, getting rid of the unnecessary stuff. To remove the use of some GIT_UNUSED, I ended up adding a couple of new iterators for hashtables that allow you to iterator just over keys or just over values. In making this change, I found a bug in the clar tests (where we were doing *count++ but meant to do (*count)++ to increment the value). I fixed that but then found the test failing because it was not really using an empty repo. So, I took some of the code that I wrote for iterator testing and moved it to clar_helpers.c, then made use of that to make it easier to open fixtures on a per test basis even within a single test file.
* config: add more comprehensive multivar testsCarlos Martín Nieto2012-02-251-13/+69
|
* Implement setting multivarsCarlos Martín Nieto2012-02-171-2/+38
|
* Support getting multivarsCarlos Martín Nieto2012-02-171-0/+28
|
* tests: add multivar read testCarlos Martín Nieto2012-02-171-0/+24
|
* Rename the Clay test suite to ClarVicent Martí2012-01-245-0/+398
Clay is the name of a programming language on the makings, and we want to avoid confusions. Sorry for the huge diff!