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.
This commit is contained in:
parent
6d284c0153
commit
73a73f7bd2
@ -40,6 +40,7 @@ ${PACKAGE}FILES+= case17.0
|
||||
${PACKAGE}FILES+= case18.0
|
||||
${PACKAGE}FILES+= case19.0
|
||||
${PACKAGE}FILES+= case20.0
|
||||
${PACKAGE}FILES+= case21.0
|
||||
${PACKAGE}FILES+= cd1.0
|
||||
${PACKAGE}FILES+= cd2.0
|
||||
${PACKAGE}FILES+= cd3.0
|
||||
|
10
bin/sh/tests/builtins/case21.0
Normal file
10
bin/sh/tests/builtins/case21.0
Normal file
@ -0,0 +1,10 @@
|
||||
# $FreeBSD$
|
||||
|
||||
case 5 in
|
||||
[0$((-9))]) ;;
|
||||
*) echo bad1 ;;
|
||||
esac
|
||||
|
||||
case - in
|
||||
[0$((-9))]) echo bad2 ;;
|
||||
esac
|
Loading…
Reference in New Issue
Block a user