blob: 102c133112c7149258d123b95acec807006890b7 [file] [log] [blame]
Lea Wiemannb4780d72008-06-19 22:32:49 +02001#!/bin/sh
2#
3# Copyright (c) 2008 Lea Wiemann
4#
5
6test_description='perl interface (Git.pm)'
7. ./test-lib.sh
8
Jeff King1b19ccd2009-04-03 15:33:59 -04009if ! test_have_prereq PERL; then
Ævar Arnfjörð Bjarmasonfadb5152010-06-24 17:44:48 +000010 skip_all='skipping perl interface tests, perl not available'
Jeff King1b19ccd2009-04-03 15:33:59 -040011 test_done
12fi
13
Jeff King94221d22013-10-28 21:23:03 -040014perl -MTest::More -e 0 2>/dev/null || {
Ævar Arnfjörð Bjarmasonfadb5152010-06-24 17:44:48 +000015 skip_all="Perl Test::More unavailable, skipping test"
Junio C Hamanoe46f9c82008-06-29 13:21:42 -070016 test_done
17}
18
Lea Wiemannb4780d72008-06-19 22:32:49 +020019# set up test repository
20
21test_expect_success \
22 'set up test repository' \
23 'echo "test file 1" > file1 &&
24 echo "test file 2" > file2 &&
25 mkdir directory1 &&
26 echo "in directory1" >> directory1/file &&
27 mkdir directory2 &&
28 echo "in directory2" >> directory2/file &&
29 git add . &&
30 git commit -m "first commit" &&
31
Frank Lichtenheldda159c72009-05-07 15:41:27 +020032 echo "new file in subdir 2" > directory2/file2 &&
33 git add . &&
34 git commit -m "commit in directory2" &&
35
Lea Wiemannb4780d72008-06-19 22:32:49 +020036 echo "changed file 1" > file1 &&
37 git commit -a -m "second commit" &&
38
Nanako Shiraishi1f773542008-09-10 06:25:26 +090039 git config --add color.test.slot1 green &&
40 git config --add test.string value &&
41 git config --add test.dupstring value1 &&
42 git config --add test.dupstring value2 &&
43 git config --add test.booltrue true &&
44 git config --add test.boolfalse no &&
45 git config --add test.boolother other &&
Jakub Narebskicb9c9df2011-10-21 20:42:44 +020046 git config --add test.int 2k &&
47 git config --add test.path "~/foo" &&
48 git config --add test.pathexpanded "$HOME/foo" &&
49 git config --add test.pathmulti foo &&
50 git config --add test.pathmulti bar
Lea Wiemannb4780d72008-06-19 22:32:49 +020051 '
52
Ævar Arnfjörð Bjarmasond998bd42010-06-24 17:44:46 +000053# The external test will outputs its own plan
54test_external_has_tap=1
55
Lea Wiemannb4780d72008-06-19 22:32:49 +020056test_external_without_stderr \
57 'Perl API' \
Jeff King94221d22013-10-28 21:23:03 -040058 perl "$TEST_DIRECTORY"/t9700/test.pl
Lea Wiemannb4780d72008-06-19 22:32:49 +020059
60test_done