Re: [PATCH 1/2] test-lib: mark function variables as local

2020-05-08 Thread Daniel Kahn Gillmor
On Thu 2020-05-07 10:31:38 +0300, Tomi Ollila wrote: > Good stuff > > robustness comment IMO: > > There is slight difference when writing > > local foo=`false` > > and > > local foo; foo=`false` > > > former does not "fail"; latter does, thanks for pointing this out. On IRC, jindraj point

Re: [PATCH 1/2] test-lib: mark function variables as local

2020-05-07 Thread Tomi Ollila
On Wed, May 06 2020, Daniel Kahn Gillmor wrote: > Several functions in test/test-lib.sh used variable names that are > also used outside of those functions (e.g. $output and $expected are > used in many of the test scripts), but they are not expected to > communicate via those variables. > > We ma

[PATCH 1/2] test-lib: mark function variables as local

2020-05-06 Thread Daniel Kahn Gillmor
Several functions in test/test-lib.sh used variable names that are also used outside of those functions (e.g. $output and $expected are used in many of the test scripts), but they are not expected to communicate via those variables. We mark those variables "local" within test-lib.sh so that they d