]> Sergey Matveev's repositories - public-inbox.git/commitdiff
t/v2writable: use simplify permissions reading
authorEric Wong (Contractor, The Linux Foundation) <e@80x24.org>
Fri, 30 Mar 2018 18:15:25 +0000 (18:15 +0000)
committerEric Wong (Contractor, The Linux Foundation) <e@80x24.org>
Fri, 30 Mar 2018 20:49:31 +0000 (20:49 +0000)
We have Git::qx nowadays.

t/v2writable.t

index 0eda432a81bcb0dd59fc7d9bd21a6527ccf4e797..7abb14f63b10b56f6b7e4e44b1088951322e7882 100644 (file)
@@ -43,13 +43,9 @@ if ('ensure git configs are correct') {
                qw(core.sharedRepository 0644));
        is(system(@cmd), 0, "set sharedRepository in all.git");
        $git0 = PublicInbox::Git->new("$mainrepo/git/0.git");
                qw(core.sharedRepository 0644));
        is(system(@cmd), 0, "set sharedRepository in all.git");
        $git0 = PublicInbox::Git->new("$mainrepo/git/0.git");
-       my $fh = $git0->popen(qw(config core.sharedRepository));
-       my $v = eval { local $/; <$fh> };
-       chomp $v;
+       chomp(my $v = $git0->qx(qw(config core.sharedRepository)));
        is($v, '0644', 'child repo inherited core.sharedRepository');
        is($v, '0644', 'child repo inherited core.sharedRepository');
-       $fh = $git0->popen(qw(config --bool repack.writeBitmaps));
-       $v = eval { local $/; <$fh> };
-       chomp $v;
+       chomp($v = $git0->qx(qw(config --bool repack.writeBitmaps)));
        is($v, 'true', 'child repo inherited repack.writeBitmaps');
 }
 
        is($v, 'true', 'child repo inherited repack.writeBitmaps');
 }