1#!/bin/sh
2#
3# Copyright (c) 2008 Lea Wiemann
4#
5
6test_description='perl interface (Git.pm)'
7. ./test-lib.sh
8
9perl -MTest::More -e 0 2>/dev/null || {
10 say_color skip "Perl Test::More unavailable, skipping test"
11 test_done
12}
13
14# set up test repository
15
16test_expect_success \
17 'set up test repository' \
18 'echo "test file 1" > file1 &&
19 echo "test file 2" > file2 &&
20 mkdir directory1 &&
21 echo "in directory1" >> directory1/file &&
22 mkdir directory2 &&
23 echo "in directory2" >> directory2/file &&
24 git add . &&
25 git commit -m "first commit" &&
26
27 echo "changed file 1" > file1 &&
28 git commit -a -m "second commit" &&
29
30 git-config --add color.test.slot1 green &&
31 git-config --add test.string value &&
32 git-config --add test.dupstring value1 &&
33 git-config --add test.dupstring value2 &&
34 git-config --add test.booltrue true &&
35 git-config --add test.boolfalse no &&
36 git-config --add test.boolother other &&
37 git-config --add test.int 2k
38 '
39
40test_external_without_stderr \
41 'Perl API' \
42 perl ../t9700/test.pl
43
44test_done