| Age | Commit message (Collapse) | Author | Lines |
|
The query parser takes an offset as low as -1, which the stats page
reads as every author, so the index clamps it for itself, as the log
and refs pages already do.
|
|
The test reads the index and the site about page, both drawn by
ui-repolist.c. Its site had no repositories, so the index it read was
the error page, and a readme printed below the list went unseen. The
shared repositories give it a real index.
|
|
The configs a run of t0101 writes are byte for byte what they were. The
scan configs name no repository and descrc adds one to a copy of the
shared config, so those keep their own form.
|
|
Nothing tested section, section-sort or repository-sort, nor the
heading's colspan, which BASE_COLUMNS has to keep in step with the
headings by hand.
|
|
It repeated the sed that cgitrc_copy runs, only to add a repository
after the copy.
|
|
|
|
Only a prefix holding no repository and a search of the whole index
were tested, so the check that tells the two messages apart could go
unnoticed.
|
|
The test looked only at the rows, which show the file's text wherever
it is read, so moving the read below the search or the sort passed.
|
|
Only the name sort had its order checked. For the other columns the
test looked for one repository on the page, and the shared fixture
could not show an order anyway, since no repository there has an
owner and their ref times tie. Nothing read an age file either,
though the idle column takes its date from one first.
|
|
The index requests passed on any answer short of a crash. The checks
for the missing tree and log links read a page an earlier test wrote,
so run alone they passed with no page at all. The description and
summary link checks matched their text anywhere on the page rather
than in foo's row.
|
|
|
|
|
|
Only a scanned repository fell back to its description file, so one
listed in cgitrc without repo.desc showed "[no description]" however
its file read. repo.desc may follow repo.path, so the file is read
where a page shows the description, which also spares every other
request the reads.
|
|
readdir hands entries back in whatever order the filesystem keeps
them, so proj111 could come before proj105 and a section could start
twice. section-sort is off by default to keep the order written in
cgitrc, and a scan has none to keep.
|
|
It asks for a log page, and the index never carries a feed link.
|
|
The helpers are named by kind. cgitrc_repo and cgitrc_copy write the
config file named first, and cgit_url, cgit_query and cgit_rc run cgit,
each named after what it is handed first. A repository copies its
defaults from the globals read before its repo.url, so cgitrc_repo
places every setting itself, and a global can no longer land where it
silently stops applying. The t00xx and t01xx files move to them here.
|
|
Every page holds foo in its footer element, the foo+bar row holds bar,
the branch switcher holds master, and commit 1 and file-1 also match
commits 10 to 19 and file-10 to file-19. A search page repeats its term
in the search box. So these checks passed on pages that lacked what
they look for, and each now matches the link itself.
|
|
Index sorting, the commit graph, the stats periods past a week, the hex
dump of a binary file and a Lua filter's html_url_arg and html_include
ran in no test.
|
|
The index description was cut at a byte count, which could split a
multibyte character and leave an invalid sequence on the page. Commit
subjects already backed up to the start of the character, so html_ntxt
now does that for every caller.
|
|
Links built from the repository url, among them the description link
on the index and the Atom and refs links, wrote it as configured, so a
name holding a space, '#' or '?' broke them. The feed link in the page
head did the same with the branch, which turned a '+' into a space.
|
|
|
|
The manual has named the commit page since it was written in 2008, a
year after the index started linking the log instead.
|
|
|
|
|
|
This allows tests to run in parallel as well as letting us use "prove"
or another TAP harness to run the tests.
Git's test framework requires Git to be fully built before letting any
tests run, so add a new target to the top-level Makefile which builds
all of Git instead of just libgit.a and make the "test" target depend on
that.
Signed-off-by: John Keeping <john@keeping.me.uk>
|
|
The "-e" option to grep is not needed unless specifying more than one
pattern, which we don't do. Remove it to avoid restricting the tests on
platforms that do not have a grep that recognises "-e".
Signed-off-by: John Keeping <john@keeping.me.uk>
|
|
These tests tries to detect bad links in various pages. On the log page,
there currently exists links which are not properly escaped due to the
use of cgit_fileurl() when building the link. For now, this bug is simply
tagged as such.
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
|
|
The link-generating functions are updated to use the new html_url_arg
function, thereby fixing links to strange repos, branches and files.
Also, the test-suite is updated to verify some cases of strange urls.
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
|
|
For some inexplicable reason I'd gotten the semantics of `grep -v` totally
backwards, thinking it somehow would make the exitcode from grep indicate
the non-match of the specified pattern.
This fixes the broken tests and gives me a valuable lession about shell
programming at the same time.
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
|
|
The segfault fixed in commit eacde43d7184452e1fdc90b982b531f1f5239923 was
triggered when the html-functions manipulated string literals. One callpatch
which could trigger the bug is in ui-repolist.c when repo descriptions are
passed to html_ntxt(): if a repo is lacking a description, the literal
string "[no description]" is used.
This patch changes test/setup.sh such that the first repo has no description,
and adds tests for both "[no description]" and "the bar repo" (description
of the other repo) to tests/t0101-index.sh, which should be enought to catch
regressions in these functions.
Noticed-by: Hiroki Hattori <seagull.kamome@gmail.com>
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
|
|
This creates a simple testsuite, heavily inspired by the testsuite in git.
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
|