blob: 3b5bae44257b40cf655e57e2b20f1afabe7428ad [file] [log] [blame]
Lars Hjemlie01f1402008-03-17 23:13:16 +01001#!/bin/sh
2
John Keepingc95cc5e2013-04-01 15:09:05 +01003test_description='Check content on patch page'
Lars Hjemlie01f1402008-03-17 23:13:16 +01004. ./setup.sh
5
John Keepingc95cc5e2013-04-01 15:09:05 +01006test_expect_success 'generate foo/patch' '
7 cgit_query "url=foo/patch" >tmp
Lars Hjemlie01f1402008-03-17 23:13:16 +01008'
9
John Keepingc95cc5e2013-04-01 15:09:05 +010010test_expect_success 'find `From:` line' '
11 grep "^From: " tmp
Lars Hjemlie01f1402008-03-17 23:13:16 +010012'
13
John Keepingc95cc5e2013-04-01 15:09:05 +010014test_expect_success 'find `Date:` line' '
15 grep "^Date: " tmp
Lars Hjemlie01f1402008-03-17 23:13:16 +010016'
17
John Keepingc95cc5e2013-04-01 15:09:05 +010018test_expect_success 'find `Subject:` line' '
19 grep "^Subject: commit 5" tmp
Lars Hjemlie01f1402008-03-17 23:13:16 +010020'
21
John Keepingc95cc5e2013-04-01 15:09:05 +010022test_expect_success 'find `cgit` signature' '
23 tail -1 tmp | grep "^cgit"
Lars Hjemlie01f1402008-03-17 23:13:16 +010024'
25
John Keepingc95cc5e2013-04-01 15:09:05 +010026test_expect_success 'find initial commit' '
27 root=$(git --git-dir="$PWD/repos/foo/.git" rev-list HEAD | tail -1)
Lars Hjemlie01f1402008-03-17 23:13:16 +010028'
29
John Keepingc95cc5e2013-04-01 15:09:05 +010030test_expect_success 'generate patch for initial commit' '
31 cgit_query "url=foo/patch&id=$root" >tmp
Lars Hjemlie01f1402008-03-17 23:13:16 +010032'
33
John Keepingc95cc5e2013-04-01 15:09:05 +010034test_expect_success 'find `cgit` signature' '
35 tail -1 tmp | grep "^cgit"
Lars Hjemlie01f1402008-03-17 23:13:16 +010036'
Mark Lodatoc94414a2010-08-26 22:02:03 -040037
John Keepingc95cc5e2013-04-01 15:09:05 +010038test_done