diff options
author | jilles <jilles@FreeBSD.org> | 2015-08-20 21:31:36 +0000 |
---|---|---|
committer | jilles <jilles@FreeBSD.org> | 2015-08-20 21:31:36 +0000 |
commit | 5d7936e9513610780b41d2d2524f2c33afed6359 (patch) | |
tree | 2527953f954e5784bec6d83cc4bc6a4ae3018ea7 /bin | |
parent | fe0a547dd0529b8fe1f9bfa1f450bfe1206b688f (diff) | |
download | FreeBSD-src-5d7936e9513610780b41d2d2524f2c33afed6359.zip FreeBSD-src-5d7936e9513610780b41d2d2524f2c33afed6359.tar.gz |
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.
Diffstat (limited to 'bin')
-rw-r--r-- | bin/sh/tests/parser/Makefile | 1 | ||||
-rw-r--r-- | bin/sh/tests/parser/dollar-quote12.0 | 7 |
2 files changed, 8 insertions, 0 deletions
diff --git a/bin/sh/tests/parser/Makefile b/bin/sh/tests/parser/Makefile index 3c9e62c..83df985 100644 --- a/bin/sh/tests/parser/Makefile +++ b/bin/sh/tests/parser/Makefile @@ -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 diff --git a/bin/sh/tests/parser/dollar-quote12.0 b/bin/sh/tests/parser/dollar-quote12.0 new file mode 100644 index 0000000..838e27c --- /dev/null +++ b/bin/sh/tests/parser/dollar-quote12.0 @@ -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" ] |