summaryrefslogtreecommitdiffstatshomepage
path: root/ui-stats.c
Commit message (Expand)AuthorAge
* ui-stats.c: set parent pointer to NULL after freeing itJohn Keeping2014-07-28
* git: update to v2.0.3John Keeping2014-07-28
* Switch to exclusively using global ctxLukas Fleischer2014-01-17
* ui-stats.c: Remove unused macroLukas Fleischer2014-01-08
* Convert cgit_print_error to a variadic functionJohn Keeping2013-04-08
* Always #include corresponding .h in .c filesJohn Keeping2013-04-08
* Mark several functions/variables staticLukas Fleischer2013-03-04
* White space around control verbs.Jason A. Donenfeld2013-03-04
* Fix several whitespace errorsLukas Fleischer2013-03-04
* Update git to v1.7.5.4John Keeping2013-03-02
* ui-stats.c: fix invalid htmlLars Hjemli2011-05-30
* ui-stats.c: create a control panel for stat optionsLars Hjemli2011-03-07
* ui-stats: Remove unnecessary #includeJohan Herland2010-11-16
* fix errors in printf-style format stringsMark Lodato2010-09-04
* Use GIT-1.7.2.2Lars Hjemli2010-08-22
* Add and use cgit_find_stats_periodname() in print_repo()Lars Hjemli2009-08-24
* ui-stats.c: reuse cgit_add_hidden_formfields()Lars Hjemli2008-12-07
* ui-stats: replace 'enable-stats' setting with 'max-stats'Lars Hjemli2008-12-07
* ui-stats: enable path-filtered statsLars Hjemli2008-12-07
* Add a 'stats' page to each repoLars Hjemli2008-12-06
d-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
#!/bin/sh

test_description='Check content on commit page'
. ./setup.sh

test_expect_success 'generate foo/commit' 'cgit_url "foo/commit" >tmp'
test_expect_success 'find tree link' 'grep "<a href=./foo/tree/.>" tmp'
test_expect_success 'find parent link' 'grep -E "<a href=./foo/commit/\?id=.+>" tmp'

test_expect_success 'find commit subject' '
	grep "<div class=.commit-subject.>commit 5<" tmp
'

test_expect_success 'find commit msg' 'grep "<div class=.commit-msg.></div>" tmp'
test_expect_success 'find diffstat' 'grep "<table summary=.diffstat. class=.diffstat.>" tmp'

test_expect_success 'find diff summary' '
	grep "1 files changed, 1 insertions, 0 deletions" tmp
'

test_expect_success 'get root commit' '
	root=$(cd repos/foo && git rev-list --reverse HEAD | head -1) &&
	cgit_url "foo/commit&id=$root" >tmp &&
	grep "</html>" tmp
'

test_expect_success 'root commit contains diffstat' '
	grep "<a href=./foo/diff/file-1.id=[0-9a-f]\{40\}.>file-1</a>" tmp
'

test_expect_success 'root commit contains diff' '
	grep ">diff --git a/file-1 b/file-1<" tmp &&
	grep "<div class=.add.>+1</div>" tmp
'

test_done