c95cc5ec56
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>
39 linhas
743 B
Bash
Arquivo executável
39 linhas
743 B
Bash
Arquivo executável
#!/bin/sh
|
|
|
|
test_description='Check content on patch page'
|
|
. ./setup.sh
|
|
|
|
test_expect_success 'generate foo/patch' '
|
|
cgit_query "url=foo/patch" >tmp
|
|
'
|
|
|
|
test_expect_success 'find `From:` line' '
|
|
grep "^From: " tmp
|
|
'
|
|
|
|
test_expect_success 'find `Date:` line' '
|
|
grep "^Date: " tmp
|
|
'
|
|
|
|
test_expect_success 'find `Subject:` line' '
|
|
grep "^Subject: commit 5" tmp
|
|
'
|
|
|
|
test_expect_success 'find `cgit` signature' '
|
|
tail -1 tmp | grep "^cgit"
|
|
'
|
|
|
|
test_expect_success 'find initial commit' '
|
|
root=$(git --git-dir="$PWD/repos/foo/.git" rev-list HEAD | tail -1)
|
|
'
|
|
|
|
test_expect_success 'generate patch for initial commit' '
|
|
cgit_query "url=foo/patch&id=$root" >tmp
|
|
'
|
|
|
|
test_expect_success 'find `cgit` signature' '
|
|
tail -1 tmp | grep "^cgit"
|
|
'
|
|
|
|
test_done
|