use PublicInbox::ContentHash qw(git_sha);
use Digest::SHA qw(sha256_hex);
-*squote_maybe = \&PublicInbox::Config::squote_maybe;
-
# move this to PublicInbox::Config if other things use it:
my %cquote = ("\n" => '\\n', "\t" => '\\t', "\b" => '\\b');
sub cquote_val ($) { # cf. git-config(1)
$self->{-cfg} = {};
my $f = $self->{'-f'} = "$dir/lei.saved-search";
open my $fh, '>', $f or return $lei->fail("open $f: $!");
- my $sq_dst = squote_maybe($dst);
+ my $sq_dst = PublicInbox::Config::squote_maybe($dst);
my $q = $lei->{mset_opt}->{q_raw} // die 'BUG: {q_raw} missing';
if (ref $q) {
$q = join("\n", map { "\tq = ".cquote_val($_) } @$q);
+#!perl -w
# Copyright (C) 2017-2021 all contributors <meta@public-inbox.org>
# License: AGPL-3+ <https://www.gnu.org/licenses/agpl-3.0.txt>
use strict;
-use warnings;
use Test::More;
+use PublicInbox::Config;
use PublicInbox::Eml;
use_ok 'PublicInbox::Reply';
while (@q) {
my $input = shift @q;
my $expect = shift @q;
- my $res = PublicInbox::Reply::squote_maybe($input);
+ my $res = PublicInbox::Config::squote_maybe($input);
is($res, $expect, "quote $input => $res");
}