]>
Commit | Line | Data |
---|---|---|
b4780d72 LW |
1 | #!/bin/sh |
2 | # | |
3 | # Copyright (c) 2008 Lea Wiemann | |
4 | # | |
5 | ||
6 | test_description='perl interface (Git.pm)' | |
7 | . ./test-lib.sh | |
8 | ||
1b19ccd2 JK |
9 | if ! test_have_prereq PERL; then |
10 | say 'skipping perl interface tests, perl not available' | |
11 | test_done | |
12 | fi | |
13 | ||
be38ca3d | 14 | "$PERL_PATH" -MTest::More -e 0 2>/dev/null || { |
fae74a04 | 15 | say "Perl Test::More unavailable, skipping test" |
e46f9c81 JH |
16 | test_done |
17 | } | |
18 | ||
b4780d72 LW |
19 | # set up test repository |
20 | ||
21 | test_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 | ||
da159c77 FL |
32 | echo "new file in subdir 2" > directory2/file2 && |
33 | git add . && | |
34 | git commit -m "commit in directory2" && | |
35 | ||
b4780d72 LW |
36 | echo "changed file 1" > file1 && |
37 | git commit -a -m "second commit" && | |
38 | ||
1f77354b NS |
39 | 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 && | |
46 | git config --add test.int 2k | |
b4780d72 LW |
47 | ' |
48 | ||
49 | test_external_without_stderr \ | |
50 | 'Perl API' \ | |
be38ca3d | 51 | "$PERL_PATH" "$TEST_DIRECTORY"/t9700/test.pl |
b4780d72 LW |
52 | |
53 | test_done |