1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-11-29 08:08:37 +00:00

sh: Add test for $'\u' without any digits.

It is likely that $'\uXXXX' and $'\UXXXXXXXX' will allow fewer digits in
future. However, no digits at all should still be disallowed.
This commit is contained in:
Jilles Tjoelker 2015-08-20 21:31:36 +00:00
parent a6bf3a9ef6
commit f84460dded
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=286971
2 changed files with 8 additions and 0 deletions

View File

@ -36,6 +36,7 @@ FILES+= dollar-quote8.0
FILES+= dollar-quote9.0
FILES+= dollar-quote10.0
FILES+= dollar-quote11.0
FILES+= dollar-quote12.0
FILES+= empty-braces1.0
FILES+= empty-cmd1.0
FILES+= for1.0

View File

@ -0,0 +1,7 @@
# $FreeBSD$
# \u without any digits at all remains invalid.
# Our choice is a parse error.
v=$( (eval ": \$'\u'") 2>&1 >/dev/null)
[ $? -ne 0 ] && [ -n "$v" ]