Add simple test for Git::config_path() in t/t9700-perl-git.sh

Tests "~/foo" path expansion and multiple values. Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Jakub Narebski committed Oct 21, 2011 at 20:42 UTC cb9c9df37acf5ff8a452b5fe2eaf7ad6ff8bfb72
2 files changed +9 -1
t/t9700-perl-git.sh
+5 -1
@@ -43,7 +43,11 @@ test_expect_success \
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
46 + 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
51 '
52
53 # The external test will outputs its own plan
t/t9700/test.pl
+4
@@ -33,6 +33,10 @@ is($r->config_int("test.int"), 2048, "config_int: integer");
33 is($r->config_int("test.nonexistent"), undef, "config_int: nonexistent");
34 ok($r->config_bool("test.booltrue"), "config_bool: true");
35 ok(!$r->config_bool("test.boolfalse"), "config_bool: false");
36 +is($r->config_path("test.path"), $r->config("test.pathexpanded"),
37 + "config_path: ~/foo expansion");
38 +is_deeply([$r->config_path("test.pathmulti")], ["foo", "bar"],
39 + "config_path: multiple values");
40 our $ansi_green = "\x1b[32m";
41 is($r->get_color("color.test.slot1", "red"), $ansi_green, "get_color");
42 # Cannot test $r->get_colorbool("color.foo")) because we do not