busybox/shell/ash_test
Ron Yorston 0e056f7e9e ash: remove parsebackquote flag
Commit 503a0b8 from git://git.kernel.org/pub/scm/utils/dash/dash.git
by Herbert Xu says:

  >The parsebackquote flag is only used in a test where it always has the
  >value zero.  So we can remove it altogether.

The first statement is incorrect:  parsebackquote is non-zero when
backquotes (as opposed to $(...)) are used for command substitution.
It is possible for the test to be executed with parsebackquote != 0 in
that case.

The test is question checks whether quotes have been closed, raising
the error "unterminated quoted string" if they haven't.  There seems
to be no good reason to allow unclosed quotes within backquotes.  Bash,
hush and dash (after commit 503a0b8) all treat the following as an error:

   XX=`"pwd`

whereas BusyBox ash doesn't.  It just ignores the unclosed quote and
executes pwd.

So, parsebackquote should be removed but not for the reason stated.

function                                             old     new   delta
parsebackquote                                         1       -      -1
readtoken1                                          3222    3182     -40
------------------------------------------------------------------------------
(add/remove: 0/1 grow/shrink: 0/1 up/down: 0/-41)             Total: -41 bytes

Signed-off-by: Ron Yorston <rmy@frippery.org>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2015-07-13 03:50:27 +02:00
..
ash-alias small ash testsuite, adapted from bash 2007-03-05 00:27:50 +00:00
ash-arith shell/math: deconvolute and explain ?: handling. Give better error message 2010-09-16 11:50:46 +02:00
ash-heredoc ash: fix handling of duplicate "local" 2015-04-18 19:36:38 +02:00
ash-invert add ash testcases 2007-03-05 20:46:46 +00:00
ash-misc ash: remove parsebackquote flag 2015-07-13 03:50:27 +02:00
ash-quoting ash: fix obscure case of replacing + globbing + backslashes 2010-06-26 22:55:44 +02:00
ash-read shell: split read builtin from ash 2010-01-12 22:11:24 +01:00
ash-redir ash: fix a bug in >${varexp} handling. Closes 5282 2012-06-09 02:06:57 +02:00
ash-signals slightly better wording in comments 2011-02-21 03:47:50 +01:00
ash-standalone ash: fix unset in standalone mode 2010-06-18 14:23:47 +02:00
ash-vars testsuite: add some tests for ash 2015-05-18 10:13:21 +02:00
printenv.c - use EXIT_{SUCCESS,FAILURE}. No object-code changes 2008-05-19 09:29:47 +00:00
recho.c whitespace cleanup 2010-10-29 11:46:52 +02:00
run-all ash: fix . builtin 2009-06-14 19:42:12 +02:00
zecho.c whitespace cleanup 2010-10-29 11:46:52 +02:00