about summary refs log tree commit diff
path: root/tests/t0108-patch.sh
diff options
context:
space:
mode:
authorJohn Keeping <john@keeping.me.uk>2013-04-01 15:09:05 +0100
committerJason A. Donenfeld <Jason@zx2c4.com>2013-04-08 22:27:11 +0200
commitc95cc5ec56dbb7394015eb18201403be6d80f69b (patch)
tree7014b96a1a1408b5291532c0c442082aba693a80 /tests/t0108-patch.sh
parentDo not load user or system gitconfig and gitattributes (diff)
downloadcgit-pink-c95cc5ec56dbb7394015eb18201403be6d80f69b.tar.gz
cgit-pink-c95cc5ec56dbb7394015eb18201403be6d80f69b.zip
tests: use Git's test framework
This allows tests to run in parallel as well as letting us use "prove"
or another TAP harness to run the tests.

Git's test framework requires Git to be fully built before letting any
tests run, so add a new target to the top-level Makefile which builds
all of Git instead of just libgit.a and make the "test" target depend on
that.

Signed-off-by: John Keeping <john@keeping.me.uk>
Diffstat (limited to 'tests/t0108-patch.sh')
-rwxr-xr-xtests/t0108-patch.sh37
1 files changed, 18 insertions, 19 deletions
diff --git a/tests/t0108-patch.sh b/tests/t0108-patch.sh
index f92f69c..3b5bae4 100755
--- a/tests/t0108-patch.sh
+++ b/tests/t0108-patch.sh
@@ -1,39 +1,38 @@
 #!/bin/sh
 
+test_description='Check content on patch page'
 . ./setup.sh
 
-prepare_tests "Check content on patch page"
-
-run_test 'generate foo/patch' '
-	cgit_query "url=foo/patch" >trash/tmp
+test_expect_success 'generate foo/patch' '
+	cgit_query "url=foo/patch" >tmp
 '
 
-run_test 'find `From:` line' '
-	grep "^From: " trash/tmp
+test_expect_success 'find `From:` line' '
+	grep "^From: " tmp
 '
 
-run_test 'find `Date:` line' '
-	grep "^Date: " trash/tmp
+test_expect_success 'find `Date:` line' '
+	grep "^Date: " tmp
 '
 
-run_test 'find `Subject:` line' '
-	grep "^Subject: commit 5" trash/tmp
+test_expect_success 'find `Subject:` line' '
+	grep "^Subject: commit 5" tmp
 '
 
-run_test 'find `cgit` signature' '
-	tail -1 trash/tmp | grep "^cgit"
+test_expect_success 'find `cgit` signature' '
+	tail -1 tmp | grep "^cgit"
 '
 
-run_test 'find initial commit' '
-	root=$(git --git-dir="$PWD/trash/repos/foo/.git" rev-list HEAD | tail -1)
+test_expect_success 'find initial commit' '
+	root=$(git --git-dir="$PWD/repos/foo/.git" rev-list HEAD | tail -1)
 '
 
-run_test 'generate patch for initial commit' '
-	cgit_query "url=foo/patch&id=$root" >trash/tmp
+test_expect_success 'generate patch for initial commit' '
+	cgit_query "url=foo/patch&id=$root" >tmp
 '
 
-run_test 'find `cgit` signature' '
-	tail -1 trash/tmp | grep "^cgit"
+test_expect_success 'find `cgit` signature' '
+	tail -1 tmp | grep "^cgit"
 '
 
-tests_done
+test_done
ogmsg'> 2022-02-19Reimplement tab completeJune McEnroe 2022-02-19Handle errors from editFn, etc.June McEnroe 2022-02-19Reimplement text macrosJune McEnroe 2022-02-19Factor out input handling to input.cJune McEnroe 2022-02-19Factor out window management to window.cJune McEnroe 2022-02-19Enable -Wmissing-prototypesJune McEnroe In other words, warn when a function is missing static. I don't see why this isn't in -Wextra. 2022-02-19Fix edit.[ch] license notice additional permissionsJune McEnroe 2022-02-19Run line editing testsJune McEnroe I know, it feels wrong. 2022-02-18Implement new line editing "library"June McEnroe Losing tab complete and text macros, for now. This new implementation works on an instance of a struct and does not interact with the rest of catgirl, making it possible to copy into another project. Unlike existing line editing libraries, this one is entirely abstract and can be rendered externally. My goal with this library is to be able to implement vi mode. Since it operates on struct instances rather than globals, it might also be possible to give catgirl separate line editing buffers for each window, which would be a nice UX improvement. 2022-02-18Simplify cursor positioning in inputJune McEnroe Do some extra work by adding the portion before the cursor to the input window twice, but simplify the interaction with the split point. This fixes the awkward behaviour when moving the cursor across colour codes where the code would be partially interpreted up to the cursor. 2022-02-18Fix M-f orderingJune McEnroe 2022-02-12Move sandman build to scripts/MakefileJune McEnroe 2022-02-12Use compat_readpassphrase.c on LinuxJune McEnroe 2022-02-12Copy RPP defines from oconfigureJune McEnroe