From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-4.2 required=3.0 tests=ALL_TRUSTED,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, T_SCC_BODY_TEXT_LINE shortcircuit=no autolearn=ham autolearn_force=no version=3.4.6 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 1045E1F542 for ; Thu, 8 Jun 2023 18:26:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=80x24.org; s=selector1; t=1686248769; bh=TF3VQGpGoEaQY5PRtaiwYblTzl8HSffWQOoZC7q4Al8=; h=From:To:Subject:Date:From; b=UlLJzCLyFQ5cD0ZD7woHtYmEV3rFPqT0sueIfR57DyPHzcSNijuPtVU+nKXET7M4h k7VpMnRMu8QcHWfjxXGYyPfSvhs5TCmNO6CVKoAcN37nDOtWKfVCeN944BJm1v6rfM Gd6WCcMzRkx6lbh2U4wmhErud5QfbADjRe6aKClg= From: Eric Wong To: meta@public-inbox.org Subject: [PATCH] t/lei.t: quiet newline warning on older Perls Date: Thu, 8 Jun 2023 18:26:08 +0000 Message-Id: <20230608182608.461133-1-e@80x24.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: Perl < 5.22 warned on newlines in the middle of a string instead of just the end. Workaround it by disabling all warnings on older Perls while running File::Path::mkpath. --- t/lei.t | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/t/lei.t b/t/lei.t index a80143ef..5d0fa622 100644 --- a/t/lei.t +++ b/t/lei.t @@ -149,7 +149,10 @@ my $test_fail = sub { for my $lk (qw(ei inbox)) { my $d = "$home/newline\n$lk"; my $all = $lk eq 'ei' ? 'ALL' : 'all'; - File::Path::mkpath("$d/$all.git/objects"); + { # quiet newline warning on older Perls + local $^W = undef if $^V lt v5.22.0; + File::Path::mkpath("$d/$all.git/objects"); + } open my $fh, '>', "$d/$lk.lock" or BAIL_OUT "open $d/$lk.lock"; for my $fl (qw(-I --only)) { ok(!lei('q', $fl, $d, 'whatever'),