Sync with 2.38.4
[git.git] / t / t9700-perl-git.sh
blobb105d6d9d57722bc7101e45b6726aef3da6b7d5c
1 #!/bin/sh
3 # Copyright (c) 2008 Lea Wiemann
6 test_description='perl interface (Git.pm)'
8 TEST_PASSES_SANITIZE_LEAK=true
9 . ./test-lib.sh
10 . "$TEST_DIRECTORY"/lib-perl.sh
12 skip_all_if_no_Test_More
14 # set up test repository
16 test_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" &&
27 echo "new file in subdir 2" > directory2/file2 &&
28 git add . &&
29 git commit -m "commit in directory2" &&
31 echo "changed file 1" > file1 &&
32 git commit -a -m "second commit" &&
34 git config --add color.test.slot1 green &&
35 git config --add test.string value &&
36 git config --add test.dupstring value1 &&
37 git config --add test.dupstring value2 &&
38 git config --add test.booltrue true &&
39 git config --add test.boolfalse no &&
40 git config --add test.boolother other &&
41 git config --add test.int 2k &&
42 git config --add test.path "~/foo" &&
43 git config --add test.pathexpanded "$HOME/foo" &&
44 git config --add test.pathmulti foo &&
45 git config --add test.pathmulti bar
48 test_expect_success 'set up bare repository' '
49 git init --bare bare.git
52 test_expect_success 'use t9700/test.pl to test Git.pm' '
53 "$PERL_PATH" "$TEST_DIRECTORY"/t9700/test.pl 2>stderr &&
54 test_must_be_empty stderr
57 test_done