freebsd-nq/bin/sh/tests
Jilles Tjoelker 8999a290ab sh: Fix executing wrong command with ${unsetvar#$(cmdsubst)}$(cmdsubst).
The parsed internal representation of words consists of a byte string with a
list of nodes (commands in command substitution). Each unescaped CTLBACKQ or
CTLBACKQ | CTLQUOTE byte corresponds to an entry in the list.

If param in ${param#%##%%word} is not set, the word is not expanded (in a
deviation of POSIX shared with other ash variants and ksh93). Erroneously,
the pointer in the list of commands (argbackq) was not advanced. This caused
the wrong command to be executed later if the outer word contained another
command substitution.

Example:
  echo "${unsetvar#$(echo a)}$(echo b)"
wrote "a" but should write "b".

MFC after:	1 week
2017-03-10 16:04:00 +00:00
..
builtins sh: Add some tests for non-standard features of the echo builtin. 2016-09-02 21:13:46 +00:00
errors Merge ^/user/ngie/release-pkg-fix-tests to unbreak how test files are installed 2016-05-04 23:20:53 +00:00
execution sh: Add simple test for 'set -C' (noclobber). 2016-11-02 22:33:37 +00:00
expansion sh: Fix executing wrong command with ${unsetvar#$(cmdsubst)}$(cmdsubst). 2017-03-10 16:04:00 +00:00
parameters sh: Do not import IFS's value from the environment. 2016-10-08 13:40:12 +00:00
parser Merge ^/user/ngie/release-pkg-fix-tests to unbreak how test files are installed 2016-05-04 23:20:53 +00:00
set-e Merge ^/user/ngie/release-pkg-fix-tests to unbreak how test files are installed 2016-05-04 23:20:53 +00:00
functional_test.sh sh: Don't hardcode relative paths in the tests stderr files. 2014-08-17 14:26:12 +00:00
Makefile Merge ^/user/ngie/release-pkg-fix-tests to unbreak how test files are installed 2016-05-04 23:20:53 +00:00
Makefile.depend DIRDEPS_BUILD: Connect MK_TESTS. 2016-03-09 22:46:01 +00:00