diff --git a/tests/test_functions/show.fish b/tests/test_functions/show.fish index 8fe8e1888..bbf6c04cd 100644 --- a/tests/test_functions/show.fish +++ b/tests/test_functions/show.fish @@ -4,8 +4,12 @@ function show --no-scope-shadowing if set -q $v set -l c (count $$v) printf '$%s count=%d\n' $v $c - for i in (seq $c) - printf '$%s[%d]=|%s|\n' $v $i $$v[1][$i] + # This test is to work around a bogosity of the BSD `seq` command. If called with + # `seq 0` it emits `1`, `0`. Whereas that GNU version outputs nothing. + if test $c -gt 0 + for i in (seq $c) + printf '$%s[%d]=|%s|\n' $v $i $$v[1][$i] + end end else echo \$$v is not set