freebsd-dev/tools/regression/bin/sh
David E. O'Brien 7cfe69417c Do not assume in growstackstr() that a "precious" character will be
immediately written into the stack after the call.  Instead let the caller
manage the "space left".

Previously, growstackstr()'s assumption causes problems with STACKSTRNUL()
where we want to be able to turn a stack into a C string, and later
pretend the NUL is not there.

This fixes a bug in STACKSTRNUL() (that grew the stack) where:
1. STADJUST() called after a STACKSTRNUL() results in an improper adjust.
   This can be seen in ${var%pattern} and ${var%%pattern} evaluation.
2. Memory leak in STPUTC() called after a STACKSTRNUL().

Reviewed by:	jilles
2010-10-13 23:29:09 +00:00
..
builtins Allow one to regression test 'sh' changes without having to install 2010-10-12 18:20:38 +00:00
errors Allow one to regression test 'sh' changes without having to install 2010-10-12 18:20:38 +00:00
execution Allow one to regression test 'sh' changes without having to install 2010-10-12 18:20:38 +00:00
expansion Do not assume in growstackstr() that a "precious" character will be 2010-10-13 23:29:09 +00:00
parameters Allow one to regression test 'sh' changes without having to install 2010-10-12 18:20:38 +00:00
parser sh: Split off a more dubious test from parser/heredoc2.0. 2010-08-16 21:14:49 +00:00
set-e sh: Get rid of unnecessary non-standard empty lists. 2010-08-16 17:18:08 +00:00
Makefile Allow one to regression test 'sh' changes without having to install 2010-10-12 18:20:38 +00:00
regress.sh Allow one to regression test 'sh' changes without having to install 2010-10-12 18:20:38 +00:00
regress.t Allow one to regression test 'sh' changes without having to install 2010-10-12 18:20:38 +00:00