Lea Wiemann | b4780d7 | 2008-06-19 22:32:49 +0200 | [diff] [blame] | 1 | #!/bin/sh |
| 2 | # |
| 3 | # Copyright (c) 2008 Lea Wiemann |
| 4 | # |
| 5 | |
| 6 | test_description='perl interface (Git.pm)' |
Ævar Arnfjörð Bjarmason | 3e3b932 | 2022-07-28 01:13:41 +0200 | [diff] [blame] | 7 | |
| 8 | TEST_PASSES_SANITIZE_LEAK=true |
Lea Wiemann | b4780d7 | 2008-06-19 22:32:49 +0200 | [diff] [blame] | 9 | . ./test-lib.sh |
Ævar Arnfjörð Bjarmason | 64f3f5a | 2022-07-28 01:13:36 +0200 | [diff] [blame] | 10 | . "$TEST_DIRECTORY"/lib-perl.sh |
Lea Wiemann | b4780d7 | 2008-06-19 22:32:49 +0200 | [diff] [blame] | 11 | |
Ævar Arnfjörð Bjarmason | 64f3f5a | 2022-07-28 01:13:36 +0200 | [diff] [blame] | 12 | skip_all_if_no_Test_More |
Junio C Hamano | e46f9c8 | 2008-06-29 13:21:42 -0700 | [diff] [blame] | 13 | |
Lea Wiemann | b4780d7 | 2008-06-19 22:32:49 +0200 | [diff] [blame] | 14 | # set up test repository |
| 15 | |
Zhang Yi | 509d3f5 | 2023-02-25 09:30:03 +0800 | [diff] [blame] | 16 | test_expect_success 'set up test repository' ' |
| 17 | echo "test file 1" >file1 && |
| 18 | echo "test file 2" >file2 && |
| 19 | mkdir directory1 && |
| 20 | echo "in directory1" >>directory1/file && |
| 21 | mkdir directory2 && |
| 22 | echo "in directory2" >>directory2/file && |
| 23 | git add . && |
| 24 | git commit -m "first commit" && |
Lea Wiemann | b4780d7 | 2008-06-19 22:32:49 +0200 | [diff] [blame] | 25 | |
Zhang Yi | 509d3f5 | 2023-02-25 09:30:03 +0800 | [diff] [blame] | 26 | echo "new file in subdir 2" >directory2/file2 && |
| 27 | git add . && |
| 28 | git commit -m "commit in directory2" && |
Frank Lichtenheld | da159c7 | 2009-05-07 15:41:27 +0200 | [diff] [blame] | 29 | |
Zhang Yi | 509d3f5 | 2023-02-25 09:30:03 +0800 | [diff] [blame] | 30 | echo "changed file 1" >file1 && |
| 31 | git commit -a -m "second commit" && |
Lea Wiemann | b4780d7 | 2008-06-19 22:32:49 +0200 | [diff] [blame] | 32 | |
Zhang Yi | 509d3f5 | 2023-02-25 09:30:03 +0800 | [diff] [blame] | 33 | git config --add color.test.slot1 green && |
| 34 | git config --add test.string value && |
| 35 | git config --add test.dupstring value1 && |
| 36 | git config --add test.dupstring value2 && |
| 37 | git config --add test.booltrue true && |
| 38 | git config --add test.boolfalse no && |
| 39 | git config --add test.boolother other && |
| 40 | git config --add test.int 2k && |
| 41 | git config --add test.path "~/foo" && |
| 42 | git config --add test.pathexpanded "$HOME/foo" && |
| 43 | git config --add test.pathmulti foo && |
| 44 | git config --add test.pathmulti bar |
| 45 | ' |
Lea Wiemann | b4780d7 | 2008-06-19 22:32:49 +0200 | [diff] [blame] | 46 | |
Jeff King | 20da61f | 2022-10-22 18:08:59 -0400 | [diff] [blame] | 47 | test_expect_success 'set up bare repository' ' |
| 48 | git init --bare bare.git |
| 49 | ' |
| 50 | |
Ævar Arnfjörð Bjarmason | 5beca49 | 2022-07-28 01:13:37 +0200 | [diff] [blame] | 51 | test_expect_success 'use t9700/test.pl to test Git.pm' ' |
| 52 | "$PERL_PATH" "$TEST_DIRECTORY"/t9700/test.pl 2>stderr && |
| 53 | test_must_be_empty stderr |
| 54 | ' |
Lea Wiemann | b4780d7 | 2008-06-19 22:32:49 +0200 | [diff] [blame] | 55 | |
| 56 | test_done |