Denys Vlasenko
b762c784ca
hush: improve ${var#...}, ${var:+...} and ${var/.../...} - handle quoting
...
dollar_altvalue1 test partially fails: word splitting of unquoted ${var:+...}
is not correct
function old new delta
encode_then_expand_vararg - 443 +443
expand_one_var 1599 1610 +11
parse_stream 2756 2753 -3
encode_string 250 242 -8
setup_heredoc 308 298 -10
expand_and_evaluate_arith 106 96 -10
encode_then_expand_string 142 126 -16
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 1/5 up/down: 454/-47) Total: 407 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2018-07-17 14:21:38 +02:00
Denys Vlasenko
46158dc833
shell: add 6856 $IFS tests to testsuites
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2018-04-11 20:24:58 +02:00
Denys Vlasenko
385cc59117
hush: plug a memory leak
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-01-12 06:47:39 +01:00
Denys Vlasenko
acdc49c073
hush: add more complex case to leak testcase, fix found breakage
...
function old new delta
unset_local_var_len - 167 +167
run_list 2350 2457 +107
set_vars_and_save_old - 87 +87
free_pipe 207 227 +20
builtin_unset 220 229 +9
builtin_exit 49 47 -2
free_strings_and_unset 53 - -53
set_vars_all_and_save_old 87 - -87
unset_local_var 168 - -168
------------------------------------------------------------------------------
(add/remove: 2/3 grow/shrink: 3/1 up/down: 390/-310) Total: 80 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-05-04 01:58:10 +02:00
Denis Vlasenko
42e4af3119
make leak test more robust by unsetting all vars
2009-04-26 23:25:36 +00:00
Denis Vlasenko
572930027d
hush: nommu fix for function passing
2009-04-26 20:06:14 +00:00
Denis Vlasenko
dcd78c4d0f
hush: fix "export not_yet_defined_var", fix parsing of "cmd | }"
...
corner case; improve hush_leaktool.sh;
fix some false positives in testsuite
function old new delta
builtin_export 191 206 +15
parse_stream 2196 2200 +4
2009-04-19 23:07:51 +00:00
Denis Vlasenko
ed055214bb
hush: fix "while...do f1() {a;}; f1; f1 {b;}; f1; done" bug
2009-04-11 10:37:10 +00:00
Denis Vlasenko
75bccfa375
hush: tweak tests
2009-04-10 23:48:03 +00:00
Denis Vlasenko
ce4acbbab6
hush: add function tests
2009-04-10 23:23:41 +00:00
Denis Vlasenko
1943aec2ec
hush: plug the leak of expanded heredoc
2009-04-09 14:15:57 +00:00
Denis Vlasenko
5c090a96f9
hush: more rodust detection of unterminated strings etc;
...
fix a case where we forget to copy `cmd` text;
optimize nommu heredoc helper by not passing environment to it;
add several tests
function old new delta
add_till_closing_paren 256 308 +52
parse_stream 2337 2378 +41
add_till_backquote 82 111 +29
re_execute_shell 269 284 +15
handle_dollar 802 812 +10
parse_stream_dquoted 316 320 +4
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 6/0 up/down: 151/0) Total: 151 bytes
2009-04-08 21:51:33 +00:00
Denis Vlasenko
ffe6f80851
expand leak_all1.tests
2009-04-08 16:59:24 +00:00
Denis Vlasenko
08daf564ae
hush: add a leak test which currently fails
2009-04-08 12:11:23 +00:00
Denis Vlasenko
c73b70c701
hush: add leak detector helper; fix/add tests for it
...
function old new delta
builtin_memleak - 92 +92
bltins 288 300 +12
2009-04-08 11:48:57 +00:00
Denis Vlasenko
afd7a8d744
hush: fix environment and memory leaks, add tests for them
...
function old new delta
add_malloced_string_to_strings - 110 +110
run_list 1999 2086 +87
free_strings_and_unsetenv - 87 +87
hush_version_str - 18 +18
pseudo_exec_argv 139 146 +7
static.version_str 17 - -17
free_pipe 237 210 -27
done_word 790 642 -148
------------------------------------------------------------------------------
(add/remove: 3/1 grow/shrink: 2/2 up/down: 309/-192) Total: 117 bytes
2008-10-09 16:29:44 +00:00
Denis Vlasenko
f962a0354e
hush: plug memory leak
2007-11-23 12:50:54 +00:00
Denis Vlasenko
d76c049cc4
hush: rework variable storage and environment handling.
...
More that -100 bytes of code + memory leak plugged.
Added a testcase for it.
2007-05-25 02:16:25 +00:00