From: Jeff King Date: Wed, 10 Apr 2013 16:00:37 GMT Subject: Re: [PATCH] test-lint-duplicates: Only check for numbered test cases Message-ID: <20130410160037.GB10749@sigill.intra.peff.net> In-Reply-To: <516573CA.2000804@web.de> On Wed, Apr 10, 2013 at 04:14:34PM +0200, Torsten Bögershausen wrote: > > test-lint-duplicates: > > - @dups=`echo $(T) | tr ' ' '\n' | sed 's/-.*//' | sort | uniq -d` && \ > > + @dups=`echo $(T) | tr ' ' '\n' | \ > > + sed -e 's,.*/,,' -e 's/\(t[0-9][0-9][0-9][0-9]\)-.*/\1/' | \ > > + sort | uniq -d` && \ > > test -z "$$dups" || { \ > > echo >&2 "duplicate test numbers:" $$dups; exit 1; } > > > > > > -Peff > I thinkg we need both the striping of the path and the "grepping" for > numbered test cases only. > I'll send a patch in a minute I think it is fine either way. My command above turns: /path/to/test-one.sh /path/to/test-two.sh into test-one.sh test-two.sh which is fine for running through uniq. If you use "sed -n", you simply end up with an empty list, which is also fine. -Peff