diff options
author | jilles <jilles@FreeBSD.org> | 2009-10-01 21:40:08 +0000 |
---|---|---|
committer | jilles <jilles@FreeBSD.org> | 2009-10-01 21:40:08 +0000 |
commit | a4d520ccb00f763ccd4dd0b5ed115e9fcb02cfb5 (patch) | |
tree | bcd4e5bd8cb7c2b6f923a66d742dde64f339d7c5 /tools/regression | |
parent | 59192f4ab17e940d81657e414a387da3db068f63 (diff) | |
download | FreeBSD-src-a4d520ccb00f763ccd4dd0b5ed115e9fcb02cfb5.zip FreeBSD-src-a4d520ccb00f763ccd4dd0b5ed115e9fcb02cfb5.tar.gz |
sh: Disallow mismatched quotes in backticks (`...`).
Due to the amount of code removed by this, it seems that allowing unmatched
quotes was a deliberate imitation of System V sh and real ksh. Most other
shells do not allow unmatched quotes (e.g. bash, zsh, pdksh, NetBSD /bin/sh,
dash).
PR: bin/137657
Diffstat (limited to 'tools/regression')
-rw-r--r-- | tools/regression/bin/sh/errors/backquote-error2.0 | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tools/regression/bin/sh/errors/backquote-error2.0 b/tools/regression/bin/sh/errors/backquote-error2.0 new file mode 100644 index 0000000..977c055 --- /dev/null +++ b/tools/regression/bin/sh/errors/backquote-error2.0 @@ -0,0 +1,7 @@ +# $FreeBSD$ + +sh -c 'echo `echo .BA"DCODE.` +echo ".BAD"CODE.' 2>&1 | grep -q BADCODE && exit 1 +echo '`"`' | sh -n 2>/dev/null && exit 1 +echo '`'"'"'`' | sh -n 2>/dev/null && exit 1 +exit 0 |