{"thread":{"id":"28737","subject":"[PATCH] Add simple test for Git::config_path() in t/t9700-perl-git.sh","startedAt":"2011-10-21T18:42:44Z","lastAt":"2011-10-21T18:42:44Z","messageCount":1,"participants":["Jakub Narebski"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"178139","messageId":"20111021184202.26990.45856.stgit@localhost.localdomain","threadId":"28737","inReplyTo":null,"subject":"[PATCH] Add simple test for Git::config_path() in t/t9700-perl-git.sh","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2011-10-21T18:42:44Z","receivedAt":"2011-10-21T18:42:44Z","isPatch":true,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"Tests \"~/foo\" path expansion and multiple values.\n\nSigned-off-by: Jakub Narebski <jnareb@gmail.com>\n---\n t/t9700-perl-git.sh |    6 +++++-\n t/t9700/test.pl     |    4 ++++\n 2 files changed, 9 insertions(+), 1 deletions(-)\n\ndiff --git a/t/t9700-perl-git.sh b/t/t9700-perl-git.sh\nindex 3787186..435d896 100755\n--- a/t/t9700-perl-git.sh\n+++ b/t/t9700-perl-git.sh\n@@ -43,7 +43,11 @@ test_expect_success \\\n      git config --add test.booltrue true &&\n      git config --add test.boolfalse no &&\n      git config --add test.boolother other &&\n-     git config --add test.int 2k\n+     git config --add test.int 2k &&\n+     git config --add test.path \"~/foo\" &&\n+     git config --add test.pathexpanded \"$HOME/foo\" &&\n+     git config --add test.pathmulti foo &&\n+     git config --add test.pathmulti bar\n      '\n \n # The external test will outputs its own plan\ndiff --git a/t/t9700/test.pl b/t/t9700/test.pl\nindex 13ba96e..3b9b484 100755\n--- a/t/t9700/test.pl\n+++ b/t/t9700/test.pl\n@@ -33,6 +33,10 @@ is($r->config_int(\"test.int\"), 2048, \"config_int: integer\");\n is($r->config_int(\"test.nonexistent\"), undef, \"config_int: nonexistent\");\n ok($r->config_bool(\"test.booltrue\"), \"config_bool: true\");\n ok(!$r->config_bool(\"test.boolfalse\"), \"config_bool: false\");\n+is($r->config_path(\"test.path\"), $r->config(\"test.pathexpanded\"),\n+   \"config_path: ~/foo expansion\");\n+is_deeply([$r->config_path(\"test.pathmulti\")], [\"foo\", \"bar\"],\n+   \"config_path: multiple values\");\n our $ansi_green = \"\\x1b[32m\";\n is($r->get_color(\"color.test.slot1\", \"red\"), $ansi_green, \"get_color\");\n # Cannot test $r->get_colorbool(\"color.foo\")) because we do not\n"}]}