[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Modifiable NMERGE in sort
From: |
Jim Meyering |
Subject: |
Re: Modifiable NMERGE in sort |
Date: |
Mon, 31 Mar 2008 16:53:25 +0200 |
"Bo Borgerson" <address@hidden> wrote:
> On Mon, Mar 31, 2008 at 2:29 AM, Paul Eggert <address@hidden> wrote:
> > Alas, that patch assumes C99, and we can't assume that quite yet.
> > Also, it mishandles nmerge values that are "too large" (you'll get
> > core dumps or worse on many hosts). That being said, it might be
> > worth adding an option like that (it's a bit specialized, but it's a
> > big performance win in some cases).
> >
One more suggestion ;-)
Add tests
==========
Nearly every significant change must be accompanied by a test suite
addition that exercises it. If you fix a bug, add at least one test that
fails without the patch, but that succeeds once your patch is applied.
If you add a feature, add tests to exercise as much of the new code
as possible.
There are hundreds of tests in the tests/ directories. You can use
tests/sample-test as a template, or one of the various Perl-based ones
in tests/misc.
If writing tests is not your thing, don't worry too much about it,
but do provide scenarios, input/output pairs, or whatever, along with
examples of running the tool to demonstrate the new or changed feature,
and someone else will massage that into a test (writing portable tests
can be a challenge).