pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/pkgtools/lintpkgsrc/files lintpkgsrc: fix handling of ...
details: https://anonhg.NetBSD.org/pkgsrc/rev/a6d9b098df36
branches: trunk
changeset: 383176:a6d9b098df36
user: rillig <rillig%pkgsrc.org@localhost>
date: Sun Aug 14 12:42:38 2022 +0000
description:
lintpkgsrc: fix handling of 0 in brace expansions
diffstat:
pkgtools/lintpkgsrc/files/lintpkgsrc.pl | 5 ++---
pkgtools/lintpkgsrc/files/t/glob.t | 8 +++-----
2 files changed, 5 insertions(+), 8 deletions(-)
diffs (42 lines):
diff -r ac8c99850275 -r a6d9b098df36 pkgtools/lintpkgsrc/files/lintpkgsrc.pl
--- a/pkgtools/lintpkgsrc/files/lintpkgsrc.pl Sun Aug 14 12:40:43 2022 +0000
+++ b/pkgtools/lintpkgsrc/files/lintpkgsrc.pl Sun Aug 14 12:42:38 2022 +0000
@@ -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 <abs%netbsd.org@localhost>.
#
@@ -250,8 +250,7 @@
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.
diff -r ac8c99850275 -r a6d9b098df36 pkgtools/lintpkgsrc/files/t/glob.t
--- a/pkgtools/lintpkgsrc/files/t/glob.t Sun Aug 14 12:40:43 2022 +0000
+++ b/pkgtools/lintpkgsrc/files/t/glob.t Sun Aug 14 12:42:38 2022 +0000
@@ -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 @@
# FIXME: '<>' is missing.
[ '<{opt,}>', '<opt>' ],
[ '<{,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) {
Home |
Main Index |
Thread Index |
Old Index