sh: Test that '!' is literal if quoted and first char of bracket expression

This also works on stable/8.
This commit is contained in:
Jilles Tjoelker 2011-06-25 20:37:43 +00:00
parent afd03ac8b0
commit b5845df384
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=223546

View File

@ -0,0 +1,16 @@
# $FreeBSD$
case ! in
[\!!]) ;;
*) echo Failed at $LINENO ;;
esac
case ! in
['!'!]) ;;
*) echo Failed at $LINENO ;;
esac
case ! in
["!"!]) ;;
*) echo Failed at $LINENO ;;
esac