Re: [PATCH] test/README: have matching test script file names

Subject: Re: [PATCH] test/README: have matching test script file names

Date: Fri, 12 Feb 2016 11:38:40 -0800

To: Tomi Ollila

Cc: notmuch@notmuchmail.org

From: W. Trevor King


On Fri, Feb 12, 2016 at 09:17:00PM +0200, Tomi Ollila wrote:
> +The test system itself requires:
> +
> +  - bash(1) version 4.0 or newer
> +
> +Without bash 4.0+ the tests just refuse to run.

This was surprising to me (obviously I haven't looked at the test
library closely ;), because Git tries to maintain compatiblity with
POSIX [1] and Git is the source of notmuch's test framework [2].  But
it looks like notmuch's fork of the test framework was Bash-specific
from 0d67c52f (notmuch-test: Use named-parameters for generate_message
function, 2010-02-03).  That commit happened before the Git framework,
but we still have the code it added:

    # This is our (bash-specific) magic for doing named parameters                                                                                                            
    local -A template="($@)"

Carl explicitly motivated the change in his commit message.  +1 to
documenting the requirement explicitly in the README, although users
should have been getting nice error messages since 20018a0c (test:
Emit a friendly error message if run with bash < 4.0, 2010-10-28).

Cheers,
Trevor

[1]: https://git.kernel.org/cgit/git/git.git/tree/Documentation/CodingGuidelines?h=v2.7.1
[2]: 0083854 (Copy test framework from Git, 2010-06-10)

-- 
This email may be signed or encrypted with GnuPG (http://www.gnupg.org).
For more information, see http://en.wikipedia.org/wiki/Pretty_Good_Privacy
signature.asc (application/pgp-signature)

Thread: