gitweb: use new Git::Repo API, and add optional caching
[git/gitweb-caching.git] / t / t9710-perl-git-repo.sh
blobeca283d45f017300278b3bf70b5bfaab7bf2575b
1 #!/bin/sh
3 # Copyright (c) 2008 Lea Wiemann
6 test_description='perl interface (Git/*.pm)'
7 . ./test-lib.sh
9 "$PERL_PATH" -e 'use 5.008' 2>/dev/null || {
10 say_color skip "Perl version older than 5.8, skipping test"
11 test_done
14 # Set up test repository. Tagging/branching is a little tricky
15 # because it needs to stay unambiguous for the name_rev tests.
17 test_expect_success \
18 'set up test repository' \
19 'echo "test file 1" > file1 &&
20 echo "test file 2" > file2 &&
21 mkdir directory1 &&
22 echo "in directory1" >> directory1/file &&
23 mkdir directory2 &&
24 echo "in directory2" >> directory2/file &&
25 git add . &&
26 git commit -m "first commit" &&
28 git tag -a -m "tag message 1" tag-object-1 &&
30 echo "changed file 1" > file1 &&
31 git commit -a -m "second commit" &&
33 git branch branch-2 &&
35 echo "changed file 2" > file2 &&
36 git commit -a -m "third commit" &&
38 git tag -a -m "tag message 3" tag-object-3 &&
39 git tag -a -m "indirect tag message 3" indirect-tag-3 tag-object-3 &&
41 echo "changed file 1 again" > file1 &&
42 git commit -a -m "fourth commit"
45 test_external_without_stderr \
46 'Git::Repo API' \
47 "$PERL_PATH" ../t9710/test.pl
49 test_done