about summary refs log tree commit diff
path: root/third_party/cgit/tests/t0102-summary.sh
diff options
context:
space:
mode:
authorVincent Ambo <Vincent Ambo>2020-01-11T23·30+0000
committerVincent Ambo <Vincent Ambo>2020-01-11T23·31+0000
commit5a069d588820da31134d435268bca1cd1532783a (patch)
treedcfee961700d80d0a30848818a2f07934af264a2 /third_party/cgit/tests/t0102-summary.sh
parent829de752da8039c7e3dab99db06d4e2112ca6ef4 (diff)
parent723dc8fbcb1a4609c264758eae420ee2811a2b55 (diff)
merge(third_party/cgit): Import at master of 2020-01-11 r/371
Imported commit '723dc8fbcb1a4609c264758eae420ee2811a2b55' as
'third_party/cgit'.
Diffstat (limited to 'third_party/cgit/tests/t0102-summary.sh')
-rwxr-xr-xthird_party/cgit/tests/t0102-summary.sh25
1 files changed, 25 insertions, 0 deletions
diff --git a/third_party/cgit/tests/t0102-summary.sh b/third_party/cgit/tests/t0102-summary.sh
new file mode 100755
index 000000000000..b8864cb18791
--- /dev/null
+++ b/third_party/cgit/tests/t0102-summary.sh
@@ -0,0 +1,25 @@
+#!/bin/sh
+
+test_description='Check content on summary page'
+. ./setup.sh
+
+test_expect_success 'generate foo summary' 'cgit_url "foo" >tmp'
+test_expect_success 'find commit 1' 'grep "commit 1" tmp'
+test_expect_success 'find commit 5' 'grep "commit 5" tmp'
+test_expect_success 'find branch master' 'grep "master" tmp'
+test_expect_success 'no tags' '! grep "tags" tmp'
+test_expect_success 'clone-url expanded correctly' '
+	grep "git://example.org/foo.git" tmp
+'
+
+test_expect_success 'generate bar summary' 'cgit_url "bar" >tmp'
+test_expect_success 'no commit 45' '! grep "commit 45" tmp'
+test_expect_success 'find commit 46' 'grep "commit 46" tmp'
+test_expect_success 'find commit 50' 'grep "commit 50" tmp'
+test_expect_success 'find branch master' 'grep "master" tmp'
+test_expect_success 'no tags' '! grep "tags" tmp'
+test_expect_success 'clone-url expanded correctly' '
+	grep "git://example.org/bar.git" tmp
+'
+
+test_done