Received: by mail.netbsd.org (Postfix, from userid 605) id 3BB1184EDB; Sun, 14 Aug 2022 12:42:40 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mail.netbsd.org (Postfix) with ESMTP id 7327484EBD for ; Sun, 14 Aug 2022 12:42:39 +0000 (UTC) X-Virus-Scanned: amavisd-new at netbsd.org Received: from mail.netbsd.org ([127.0.0.1]) by localhost (mail.netbsd.org [127.0.0.1]) (amavisd-new, port 10025) with ESMTP id aAVrijvU67dg for ; Sun, 14 Aug 2022 12:42:39 +0000 (UTC) Received: from cvs.NetBSD.org (ivanova.NetBSD.org [IPv6:2001:470:a085:999:28c:faff:fe03:5984]) by mail.netbsd.org (Postfix) with ESMTP id DD04784D8D for ; Sun, 14 Aug 2022 12:42:38 +0000 (UTC) Received: by cvs.NetBSD.org (Postfix, from userid 500) id CC01DFB1A; Sun, 14 Aug 2022 12:42:38 +0000 (UTC) Content-Transfer-Encoding: 7bit Content-Type: multipart/mixed; boundary="_----------=_1660480958110760" MIME-Version: 1.0 Date: Sun, 14 Aug 2022 12:42:38 +0000 From: "Roland Illig" Subject: CVS commit: pkgsrc/pkgtools/lintpkgsrc/files To: pkgsrc-changes@NetBSD.org Reply-To: rillig@netbsd.org X-Mailer: log_accum Message-Id: <20220814124238.CC01DFB1A@cvs.NetBSD.org> Sender: pkgsrc-changes-owner@NetBSD.org List-Id: Precedence: bulk List-Unsubscribe: This is a multi-part message in MIME format. --_----------=_1660480958110760 Content-Disposition: inline Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII" Module Name: pkgsrc Committed By: rillig Date: Sun Aug 14 12:42:38 UTC 2022 Modified Files: pkgsrc/pkgtools/lintpkgsrc/files: lintpkgsrc.pl pkgsrc/pkgtools/lintpkgsrc/files/t: glob.t Log Message: lintpkgsrc: fix handling of 0 in brace expansions To generate a diff of this commit: cvs rdiff -u -r1.92 -r1.93 pkgsrc/pkgtools/lintpkgsrc/files/lintpkgsrc.pl cvs rdiff -u -r1.9 -r1.10 pkgsrc/pkgtools/lintpkgsrc/files/t/glob.t Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. --_----------=_1660480958110760 Content-Disposition: inline Content-Length: 1724 Content-Transfer-Encoding: binary Content-Type: text/x-diff; charset=us-ascii Modified files: Index: pkgsrc/pkgtools/lintpkgsrc/files/lintpkgsrc.pl diff -u pkgsrc/pkgtools/lintpkgsrc/files/lintpkgsrc.pl:1.92 pkgsrc/pkgtools/lintpkgsrc/files/lintpkgsrc.pl:1.93 --- pkgsrc/pkgtools/lintpkgsrc/files/lintpkgsrc.pl:1.92 Sun Aug 14 12:40:43 2022 +++ pkgsrc/pkgtools/lintpkgsrc/files/lintpkgsrc.pl Sun Aug 14 12:42:38 2022 @@ -1,5 +1,5 @@ #!@PERL5@ -# $NetBSD: lintpkgsrc.pl,v 1.92 2022/08/14 12:40:43 rillig Exp $ +# $NetBSD: lintpkgsrc.pl,v 1.93 2022/08/14 12:42:38 rillig Exp $ # Written by David Brownlee . # @@ -250,8 +250,7 @@ sub expand_braces($str) { my @todo = ($str); my @expanded; - # FIXME: see test_expand_braces. - while ($str = shift @todo) { + while (defined($str = shift @todo)) { # FIXME: see test_expand_braces. if ($str =~ /(.*) \{ ([^{}]+) } (.*)/x) { # FIXME: see test_expand_braces. Index: pkgsrc/pkgtools/lintpkgsrc/files/t/glob.t diff -u pkgsrc/pkgtools/lintpkgsrc/files/t/glob.t:1.9 pkgsrc/pkgtools/lintpkgsrc/files/t/glob.t:1.10 --- pkgsrc/pkgtools/lintpkgsrc/files/t/glob.t:1.9 Sun Aug 14 12:40:43 2022 +++ pkgsrc/pkgtools/lintpkgsrc/files/t/glob.t Sun Aug 14 12:42:38 2022 @@ -1,4 +1,4 @@ -# $NetBSD: glob.t,v 1.9 2022/08/14 12:40:43 rillig Exp $ +# $NetBSD: glob.t,v 1.10 2022/08/14 12:42:38 rillig Exp $ # # Tests for file globbing and matching. @@ -66,10 +66,8 @@ sub test_expand_braces() { # FIXME: '<>' is missing. [ '<{opt,}>', '' ], [ '<{,opt}>', '<>', '' ], - # FIXME: '0', '1', '2' are missing. - [ '{0,1,2}', ], - # FIXME: '0' is missing. - [ '{2,1,0}', '2', '1' ], + [ '{0,1,2}', '0', '1', '2' ], + [ '{2,1,0}', '2', '1', '0' ], ); foreach my $example (@examples) { --_----------=_1660480958110760--