diff options
author | Junio C Hamano <gitster@pobox.com> | 2011-10-26 16:16:30 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2011-10-26 16:16:30 -0700 |
commit | 3b6a5d2d05d4945e11fbc3669a82f81ce18f80a4 (patch) | |
tree | 5ef910f70fbaf184ce9841b190f33d27c9542e6d /t | |
parent | aface4c3904de688ced9cecad4ac07bc3afeec8f (diff) | |
parent | cb9c9df37acf5ff8a452b5fe2eaf7ad6ff8bfb72 (diff) | |
download | git-3b6a5d2d05d4945e11fbc3669a82f81ce18f80a4.tar.gz |
Merge branch 'jn/libperl-git-config'
* jn/libperl-git-config:
Add simple test for Git::config_path() in t/t9700-perl-git.sh
libperl-git: refactor Git::config_*
Diffstat (limited to 't')
-rwxr-xr-x | t/t9700-perl-git.sh | 6 | ||||
-rwxr-xr-x | t/t9700/test.pl | 4 |
2 files changed, 9 insertions, 1 deletions
diff --git a/t/t9700-perl-git.sh b/t/t9700-perl-git.sh index 3787186703..435d896476 100755 --- a/t/t9700-perl-git.sh +++ b/t/t9700-perl-git.sh @@ -43,7 +43,11 @@ test_expect_success \ git config --add test.booltrue true && git config --add test.boolfalse no && git config --add test.boolother other && - git config --add test.int 2k + git config --add test.int 2k && + git config --add test.path "~/foo" && + git config --add test.pathexpanded "$HOME/foo" && + git config --add test.pathmulti foo && + git config --add test.pathmulti bar ' # The external test will outputs its own plan diff --git a/t/t9700/test.pl b/t/t9700/test.pl index 13ba96e21a..3b9b48408a 100755 --- a/t/t9700/test.pl +++ b/t/t9700/test.pl @@ -33,6 +33,10 @@ is($r->config_int("test.int"), 2048, "config_int: integer"); is($r->config_int("test.nonexistent"), undef, "config_int: nonexistent"); ok($r->config_bool("test.booltrue"), "config_bool: true"); ok(!$r->config_bool("test.boolfalse"), "config_bool: false"); +is($r->config_path("test.path"), $r->config("test.pathexpanded"), + "config_path: ~/foo expansion"); +is_deeply([$r->config_path("test.pathmulti")], ["foo", "bar"], + "config_path: multiple values"); our $ansi_green = "\x1b[32m"; is($r->get_color("color.test.slot1", "red"), $ansi_green, "get_color"); # Cannot test $r->get_colorbool("color.foo")) because we do not |