tests/iterator


Log

Author Commit Date CI Message
Patrick Steinhardt ecf4f33a 2018-02-08T11:14:48 Convert usage of `git_buf_free` to new `git_buf_dispose`
Patrick Steinhardt 1bf57b5a 2018-05-04T15:27:11 tests: iterator::workdir: fix GCC warning Since GCC 8.1, the compiler performs some bounds checking when copying static data into arrays with a known size. In one test, we print a format string of "%s/sub%02d" into a buffer of 64 bytes. The input buffer for the first "%s" is bounded to at most 63 characters, plus four bytes for the static string "/sub" plus two more bytes for "%02d". Thus, our target buffer needs to be at least 70 bytes in size, including the NUL byte. There seems to be a bug in the analysis, though, because GCC will not account for the limiting "%02" prefix, treating it as requiring the same count of bytes as a "%d". Thus, we end up at 79 bytes that are required to fix the warning. To make it look nicer and less special, we just round the buffer size up to 80 bytes.
Edward Thomson 18d9c847 2018-02-20T00:32:38 testrepo: add new branch Add a new branch to the `testrepo` repository, where the `README` file has changed to executable. This branch enables typechange tests between the new `executable` branch and `master`.
Patrick Steinhardt b8c14499 2017-06-07T11:00:26 tests: iterator::workdir: fix reference count in stale test The test `iterator::workdir::filesystem_gunk` is usually not executed, as it is guarded by the environment variable "GITTEST_INVASIVE_SPEED" due to its effects on speed. As such, it has become stale and does not account for new references which have meanwhile been added to the testrepo, causing it to fail. Fix this by raising the number of expected references to 15.
Patrick Steinhardt 9aba7636 2017-06-07T10:59:31 tests: iterator_helpers: assert number of iterator items When the function `expect_iterator_items` surpasses the number of expected items, we simply break the loop. This causes us to trigger an assert later on which has message attached, which is annoying when trying to locate the root error cause. Instead, directly assert that the current count is still smaller or equal to the expected count inside of the loop.
Patrick Steinhardt 72c28ab0 2017-06-07T10:59:03 tests: status::worktree: indicate skipped tests on Win32 Some function bodies of tests which are not applicable to the Win32 platform are completely #ifdef'd out instead of calling `cl_skip()`. This leaves us with no indication that these tests are not being executed at all and may thus cause decreased scrutiny when investigating skipped tests. Improve the situation by calling `cl_skip()` instead of just doing nothing.
Patrick Steinhardt 8acc3b16 2015-11-10T15:53:09 tests: add merge-conflict branch for testrepo Add a new branch that causes a merge conflict to `testrepo` so that we are able to test merging in worktrees.
Patrick Steinhardt bd9f4fd2 2015-11-11T10:54:08 tests: add worktree test data
Edward Thomson 498d0801 2016-07-22T12:01:24 tests: use a `size_t`
Edward Thomson bbd65ad2 2016-04-11T13:39:31 tests: skip the unreadable file tests as root When running as root, skip the unreadable file tests, because, well, they're probably _not_ unreadable to root unless you've got some crazy NSA clearance-level honoring operating system shit going on.
Edward Thomson d47f7e1c 2016-04-02T13:03:09 iterator: support trailing `/` in start for submod Allow callers to specify a start path with a trailing slash to match a submodule, instead of just a directory. This is for some legacy behavior that's sort of dumb, but there it is.
Edward Thomson 17442b28 2016-03-30T17:47:05 leaks: fix some leaks in the tests
Marc Strapetz c017c183 2016-03-22T10:29:12 iterator: new workdir-iterator test for pathlist + includings trees
Marc Strapetz 09064f15 2016-03-22T10:28:50 iterator: new index-iterator test for pathlist + includings trees
Marc Strapetz 8152a748 2016-03-22T10:27:50 iterator: more pathlist-related tests should test actual paths
Edward Thomson d712c2b2 2016-03-21T18:30:21 iterator: don't run the gunk test by default on CI (It's slow!)
Edward Thomson 0ef0b71c 2016-03-21T12:54:47 iterator: refactor index iterator
Edward Thomson de034cd2 2016-03-18T10:59:38 iterator: give the tests a proper hierarchy Iterator tests were split over repo::iterator and diff::iterator, with duplication between the two. Move them to iterator::index, iterator::tree, and iterator::workdir.