Re: [PATCH v2 2/6] test-lib: refactor $GIT_SKIP_TESTS matching
- From
Johannes Sixt <j.sixt@viscovery.net>
- Date
- Jun 18, 2013, 07:03 UTC
- Message-ID
- <51C0064B.8060408@viscovery.net>
- In-Reply-To
- <4795e6f40e7ce62fc4c414e8cbbd2aa777d3fbb0.1371460265.git.trast@inf.ethz.ch>
Am 6/17/2013 11:18, schrieb Thomas Rast:
Show 13 quoted lines
> +match_pattern_list () {
> + arg="$1"
> + shift
> + test -z "$*" && return 1
> + for pat
> + do
> + case "$arg" in
> + $pat)
> + return 0
> + esac
> + done
> + return 1
> +}Watch this failing test case:
GIT_SKIP_TESTS="t950[012]" ./t3006-ls-files-long.sh
'pat' is too short and too sweet to be used as a shell variable name in a library function. ;)
-- Hannes