summary refs log tree commit diff
path: root/www/git.causal.agency/cgit/tests/t0102-summary.sh
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2020-12-27 18:45:04 -0500
committerJune McEnroe <june@causal.agency>2020-12-27 18:45:35 -0500
commit7b715a386a625ea3cf92b1281a4392e2473b830a (patch)
tree9353eea94b35e91f229be03061835b8fb788570a /www/git.causal.agency/cgit/tests/t0102-summary.sh
parentRemove 1sh (diff)
parentSquashed 'www/git.causal.agency/cgit/' content from commit 02221fd3 (diff)
downloadsrc-7b715a386a625ea3cf92b1281a4392e2473b830a.tar.gz
src-7b715a386a625ea3cf92b1281a4392e2473b830a.zip
Merge commit '85016e706cd00e527dba3fa83b2783dfb56a4ffa' as 'www/git.causal.agency/cgit'
From tag 'v1.2.3'.
Diffstat (limited to 'www/git.causal.agency/cgit/tests/t0102-summary.sh')
-rwxr-xr-xwww/git.causal.agency/cgit/tests/t0102-summary.sh25
1 files changed, 25 insertions, 0 deletions
diff --git a/www/git.causal.agency/cgit/tests/t0102-summary.sh b/www/git.causal.agency/cgit/tests/t0102-summary.sh
new file mode 100755
index 00000000..b8864cb1
--- /dev/null
+++ b/www/git.causal.agency/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