about summary refs log tree commit homepage
path: root/t/config.t
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2019-09-28 20:59:30 +0000
committerEric Wong <e@80x24.org>2019-09-30 05:55:36 +0000
commita722d9aa28c19d82b74ccde6d94e6bdde9917f0c (patch)
tree778dfa4fb72fbdf20d7bf172c2998353eb2fa836 /t/config.t
parent2fc42236f72ad16a33288f58086edc95da56c612 (diff)
downloadpublic-inbox-a722d9aa28c19d82b74ccde6d94e6bdde9917f0c.tar.gz
This allows us to deal with newlines in config values,
since git-config(1) acquired "-z" support in git v1.5.3.

I'm not sure if it's actually useful in our case, but
maybe some multi-line texts could be added.  And newlines
in path names are super useful!
Diffstat (limited to 't/config.t')
-rw-r--r--t/config.t4
1 files changed, 2 insertions, 2 deletions
diff --git a/t/config.t b/t/config.t
index a4e76150..a3c74fa2 100644
--- a/t/config.t
+++ b/t/config.t
@@ -9,12 +9,12 @@ my $tmpdir = tempdir('pi-config-XXXXXX', TMPDIR => 1, CLEANUP => 1);
 
 {
         is(system(qw(git init -q --bare), $tmpdir), 0, "git init successful");
-        my @cmd = ('git', "--git-dir=$tmpdir", qw(config foo.bar hihi));
+        my @cmd = ('git', "--git-dir=$tmpdir", qw(config foo.bar), "hi\nhi");
         is(system(@cmd), 0, "set config");
 
         my $tmp = PublicInbox::Config->new("$tmpdir/config");
 
-        is("hihi", $tmp->{"foo.bar"}, "config read correctly");
+        is("hi\nhi", $tmp->{"foo.bar"}, "config read correctly");
         is("true", $tmp->{"core.bare"}, "used --bare repo");
 }