summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 6942a3d)
raw | patch | inline | side by side (parent: 6942a3d)
author | Jakub Narebski <jnareb@gmail.com> | |
Fri, 21 Oct 2011 18:42:44 +0000 (20:42 +0200) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Fri, 21 Oct 2011 21:34:08 +0000 (14:34 -0700) |
Tests "~/foo" path expansion and multiple values.
Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t9700-perl-git.sh | patch | blob | history | |
t/t9700/test.pl | patch | blob | history |
diff --git a/t/t9700-perl-git.sh b/t/t9700-perl-git.sh
index 3787186703f51f75103824f562c3849483ceaae1..435d8964763d3f048a71db5453b3a19e0cbb7fb9 100755 (executable)
--- a/t/t9700-perl-git.sh
+++ b/t/t9700-perl-git.sh
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 13ba96e21a9295805aed40c89ecd5178db6bfae4..3b9b48408a87150fad9b1ac1f8cf5ea65e2b09ba 100755 (executable)
--- a/t/t9700/test.pl
+++ b/t/t9700/test.pl
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