about summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to '')
-rwxr-xr-xtests/t0108-patch.sh37
1 files changed, 37 insertions, 0 deletions
diff --git a/tests/t0108-patch.sh b/tests/t0108-patch.sh
new file mode 100755
index 0000000..33351d6
--- /dev/null
+++ b/tests/t0108-patch.sh
@@ -0,0 +1,37 @@
+#!/bin/sh
+
+. ./setup.sh
+
+prepare_tests "Check content on patch page"
+
+run_test 'generate foo/patch' '
+	cgit_query "url=foo/patch" >trash/tmp
+'
+
+run_test 'find `From:` line' '
+	grep -e "^From: " trash/tmp
+'
+
+run_test 'find `Date:` line' '
+	grep -e "^Date: " trash/tmp
+'
+
+run_test 'find `Subject:` line' '
+	grep -e "^Subject: commit 5" trash/tmp
+'
+
+run_test 'find `cgit` signature' '
+	 tail -1 trash/tmp | grep -e "^cgit"
+'
+
+run_test 'find initial commit' '
+	root=$(git --git-dir=$PWD/trash/repos/foo/.git rev-list HEAD | tail -1)
+'
+
+run_test 'generate patch for initial commit' '
+	cgit_query "url=foo/patch&id=$root" >trash/tmp
+'
+
+run_test 'find `cgit` signature' '
+	tail -1 trash/tmp | grep -e "^cgit"
+'
d>2020-12-29Add make lexerJune McEnroe This is kind of a mess and needs to be cleaned up against more careful reading of the make grammar. 2020-12-29Clean up C lexerJune McEnroe This ordering of rules feels much cleaner. 2020-12-29Clean up hilex code somewhatJune McEnroe 2020-12-29Match lex/yacc %% %{ %} lines as MacroJune McEnroe 2020-12-29Match top-level C definitions as IdentifierTagJune McEnroe 2020-12-29Match C type declarations as IdentifierTagJune McEnroe 2020-12-29Match function-like macro definitions as IdentifierTagJune McEnroe 2020-12-29Reconfigure C macro start conditionsJune McEnroe 2020-12-29Document HTML class namesJune McEnroe 2020-12-29Rename Tag class to IdentifierTagJune McEnroe 2020-12-29Change HTML class from hi to hilexJune McEnroe You can tell I was just copying the HTML code huh. 2020-12-29Add hilex HTML outputJune McEnroe