Git fork
1#!/bin/sh
2
3test_description='git annotate'
4GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
5export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
6
7TEST_CREATE_REPO_NO_TEMPLATE=1
8. ./test-lib.sh
9
10if ! test_have_prereq PERL_TEST_HELPERS
11then
12 skip_all='skipping annotate tests; Perl not available'
13 test_done
14fi
15
16PROG='git annotate'
17. "$TEST_DIRECTORY"/annotate-tests.sh
18
19test_expect_success 'annotate old revision' '
20 git annotate file main >actual &&
21 awk "{ print \$3; }" <actual >authors &&
22 test 2 = $(grep A <authors | wc -l) &&
23 test 2 = $(grep B <authors | wc -l)
24'
25
26test_done