Commit Graph

9 Commits (a4de0e810b69710c3b32f6d253d80d16dec09f36)

Author SHA1 Message Date
Christian Hesse a4de0e810b global: replace hard coded hash length
With sha1 we had a guaranteed length of 40 hex chars. This changes now
that we have to support sha256 with 64 hex chars... Support both.

Signed-off-by: Christian Hesse <mail@eworm.de>
4 years ago
John Keeping c95cc5ec56 tests: use Git's test framework
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>
11 years ago
John Keeping f9b801a174 tests: make whitespace consistent
Signed-off-by: John Keeping <john@keeping.me.uk>
11 years ago
John Keeping 392e07d28a tests: "grep -e" is not portable to all platforms
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>
11 years ago
Lars Hjemli 38fde35f9a tests/t0105-commit.sh: expect commit decorations
When a commit is referenced by a branch or tag the commit subject-
line will be suffixed with the proper decorations, hence the test
for this line needs to be updated.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
16 years ago
Lars Hjemli 8907f2a031 Include commit-id in link from diff-stat
This fixes a regression created by fe1230dece,
and modifies a test to avoid future regressions.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
16 years ago
Lars Hjemli 502d57596e ui-commit: handle root commits
Both cgit_print_diff() and cgit_diff_tree() handles root commits nicely,
but cgit_print_commit() forgot to check the case of 0 parents.

This fixes it, and adds tests to avoid future regressions.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
16 years ago
Lars Hjemli 2915483ef6 Fix html error detected by test-suite
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
17 years ago
Lars Hjemli b4649fc905 Create initial testsuite
This creates a simple testsuite, heavily inspired by the testsuite in git.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
17 years ago