Documentation/everyday: match undefline with the text
[gitweb.git] / t / t4202-log.sh
index cb03d287698f110b66e69636348caccdbe6a94f8..99ab7ca21f2673e646232d9c07f77c8ed2f5f998 100755 (executable)
@@ -3,6 +3,7 @@
 test_description='git log'
 
 . ./test-lib.sh
+. "$TEST_DIRECTORY/lib-gpg.sh"
 
 test_expect_success setup '
 
@@ -841,4 +842,34 @@ test_expect_success 'dotdot is a parent directory' '
        test_cmp expect actual
 '
 
+test_expect_success GPG 'log --graph --show-signature' '
+       test_when_finished "git reset --hard && git checkout master" &&
+       git checkout -b signed master &&
+       echo foo >foo &&
+       git add foo &&
+       git commit -S -m signed_commit &&
+       git log --graph --show-signature -n1 signed >actual &&
+       grep "^| gpg: Signature made" actual &&
+       grep "^| gpg: Good signature" actual
+'
+
+test_expect_success GPG 'log --graph --show-signature for merged tag' '
+       test_when_finished "git reset --hard && git checkout master" &&
+       git checkout -b plain master &&
+       echo aaa >bar &&
+       git add bar &&
+       git commit -m bar_commit &&
+       git checkout -b tagged master &&
+       echo bbb >baz &&
+       git add baz &&
+       git commit -m baz_commit &&
+       git tag -s -m signed_tag_msg signed_tag &&
+       git checkout plain &&
+       git merge --no-ff -m msg signed_tag &&
+       git log --graph --show-signature -n1 plain >actual &&
+       grep "^|\\\  merged tag" actual &&
+       grep "^| | gpg: Signature made" actual &&
+       grep "^| | gpg: Good signature" actual
+'
+
 test_done