Jilles Tjoelker 73a73f7bd2 sh: Add test for arithmetic expansion in [x-y] pattern range.
It does not make much sense to generate the '-' in a pattern bracket
expression using arithmetic expansion, but it does not make sense to forbid
it either.

This test already passes.
2017-05-13 20:28:32 +00:00

11 lines
100 B
Plaintext

# $FreeBSD$
case 5 in
[0$((-9))]) ;;
*) echo bad1 ;;
esac
case - in
[0$((-9))]) echo bad2 ;;
esac