freebsd-dev/tools/regression/bin/sh/expansion
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
..
arith1.0 sh: arith: Return only 0 and 1 from && and ||. 2009-12-30 15:59:40 +00:00
arith2.0 sh: Remove comment that the comma operator is missing in arithmetic 2010-07-02 21:31:24 +00:00
arith3.0 sh: arith: Add a test for a bug in the dash arith code, 2010-02-17 22:25:22 +00:00
arith4.0 sh: Add test for some associativity in arithmetic. 2010-04-04 16:29:48 +00:00
arith5.0 sh: Add test for nested arithmetic substitution. 2010-04-04 16:48:33 +00:00
assign1.0 sh: Add some testcases for ${v=w}, ${v-w}, ${v+w}. 2010-03-07 18:43:29 +00:00
cmdsubst1.0 sh: Fix some bugs with backquoted builtins: 2010-01-01 18:17:46 +00:00
cmdsubst2.0 sh: Add tests for " and $ inside `. 2010-03-12 23:23:46 +00:00
ifs1.0
ifs2.0 sh: Test that all bytes from 1 to 127 can be used in IFS. 2010-08-15 17:14:05 +00:00
ifs3.0 sh: Test that all bytes from 128 to 255 can be used in IFS. 2010-08-22 13:09:12 +00:00
pathname1.0 sh: Add some simple testcases for pathname expansion. 2010-05-11 22:28:55 +00:00
pathname2.0 sh: Fix pathname expansion with quoted slashes like *\/. 2010-05-11 23:19:28 +00:00
pathname3.0 sh: Fix heap-based buffer overflow in pathname generation. 2010-08-10 22:45:59 +00:00
pathname4.0 sh: Remove remnants of '!!' to negate pattern. 2010-08-22 21:18:21 +00:00
plus-minus1.0 sh: Add some testcases for ${v=w}, ${v-w}, ${v+w}. 2010-03-07 18:43:29 +00:00
plus-minus2.0 sh: Fix various things about expansions: 2010-04-03 20:55:56 +00:00
plus-minus3.0 sh: Add testcases for double-quotes within quoted ${var+-...} (non-POSIX). 2010-04-18 22:13:45 +00:00
plus-minus4.0 sh: Add more testcases for ${var:-word}. 2010-08-08 17:03:23 +00:00
question1.0 Allow one to regression test 'sh' changes without having to install 2010-10-12 18:20:38 +00:00
set-u1.0 Allow one to regression test 'sh' changes without having to install 2010-10-12 18:20:38 +00:00
set-u2.0 sh: Exempt $@ and $* from set -u 2009-10-24 21:20:04 +00:00
tilde1.0 sh: Fix duplicate variable name in test. 2010-04-03 21:56:24 +00:00
tilde2.0 sh: Do tilde expansion in substitutions. 2010-04-03 22:04:44 +00:00
trim1.0 sh: Add some testcases for the working parts of ${v%...} and ${v#...}. 2010-04-03 20:14:10 +00:00
trim2.0 sh: Allow quoting pattern match characters in ${v%pat} and ${v#pat}. 2010-04-03 21:07:50 +00:00
trim3.0 sh: Add some more tests for ${v#...} and ${v%...}. 2010-04-23 17:26:49 +00:00
trim4.0 Do not assume in growstackstr() that a "precious" character will be 2010-10-13 23:29:09 +00:00