Re: [PATCH v2] test: add "set -u" to test-lib.sh

Subject: Re: [PATCH v2] test: add "set -u" to test-lib.sh

Date: Mon, 27 Jun 2016 18:04:31 +0300

To: David Bremner, notmuch@notmuchmail.org

Cc:

From: Tomi Ollila


On Mon, Jun 27 2016, David Bremner <david@tethera.net> wrote:

> Tomi Ollila <tomi.ollila@iki.fi> writes:
>
>> This prohibits unset variables to expand to empty strings.
>> Without this e.g misspelled variables cause unintentional results.
>>
>> Now all the test variables are either initialized, or in case of
>> optional arguments and user-provided environment variables (i.e.
>> when it is not know whethet the variable is set) the form
>> ${variable-} is used.
>>
>> Two unusable lines (leftovers?) in T360-symbol-hiding.sh were removed;
>> this was the only non-lib test code that needed to be edited for this
>> change to work.
>
> Hi Tomi;
>
> I like the idea, but currently I get many test failures with
>
> /test-lib.sh: line 926: test_subtest_missing_external_prereq_: unbound
> variable

Interesting... have to investigate why I did not get those (IMO I should have...)

Tomi

>
> d

Thread: