From: Daniel Kahn Gillmor Date: Fri, 8 May 2020 23:24:38 +0000 (-0400) Subject: test-lib: mark function variables as local X-Git-Tag: archive/debian/0.30_rc0-1~24 X-Git-Url: https://git.cworth.org/git?a=commitdiff_plain;h=627460d7bbbb6b95a07084c2b6fc7f647a5547e1;hp=627460d7bbbb6b95a07084c2b6fc7f647a5547e1;p=notmuch test-lib: mark function variables as local 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 do not get clobbered when used outside test-lib. We also move the local variable declarations to beginning of each function, to avoid weird gotchas with local variable declarations as described in https://tldp.org/LDP/abs/html/localvar.html. Signed-off-by: Daniel Kahn Gillmor ---