aboutsummaryrefslogtreecommitdiff
path: root/shell/hush_test
AgeCommit message (Collapse)Author
2009-05-03hush: fix \<newline> handlingDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-05-02hush: fix multiple redirections of the same fd (bug 227)Denys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-04-26make leak test more robust by unsetting all varsDenis Vlasenko
2009-04-26hush: make getopt32 usable in builtins. use it in unset.Denis Vlasenko
more uses are expected in the future. function old new delta getopt32 1356 1393 +37 builtin_export 256 266 +10 builtin_unset 418 380 -38
2009-04-26hush: nommu fix for function passingDenis Vlasenko
2009-04-26hush: fix SEGV in % expansionDenis Vlasenko
function old new delta expand_variables 2203 2217 +14
2009-04-20hush: export -n supportDenis Vlasenko
function old new delta builtin_export 206 256 +50 set_local_var 248 265 +17 expand_variables 2204 2203 -1
2009-04-20hush: add two testcasesDenis Vlasenko
2009-04-20hush: fix stdin of backgrounded pipe Denis Vlasenko
function old new delta run_list 2450 2502 +52
2009-04-19hush: fix "export not_yet_defined_var", fix parsing of "cmd | }"Denis Vlasenko
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-19hush: fix handling of } which is not a closing one in { cmd; }Denis Vlasenko
function old new delta parse_stream 2176 2302 +126 builtin_unset 381 387 +6
2009-04-17hush: return builtin by Bayram Kurumahmut (kbayram AT ubicom.com)Denis Vlasenko
~+200 bytes
2009-04-16hush: fix "if { echo foo; } then { echo bar; } fi" parsingDenis Vlasenko
function old new delta done_word 728 793 +65 parse_stream 2084 2098 +14
2009-04-11hush: fix "while...do f1() {a;}; f1; f1 {b;}; f1; done" bugDenis Vlasenko
2009-04-10hush: tweak testsDenis Vlasenko
2009-04-10hush: add function testsDenis Vlasenko
2009-04-10hush: fix some TODOs. TODO in export builting: +250 bytes.Denis Vlasenko
simplify unexpected EOF handling. function old new delta builtin_export 117 374 +257 o_reset_to_empty_unquoted - 21 +21 parse_stream 1926 1929 +3 syntax_error_unterm_ch 31 32 +1 handle_dollar 644 641 -3 parse_stream_dquoted 307 298 -9 add_till_backquote 106 97 -9 add_till_closing_paren 303 286 -17 o_reset 21 - -21 ------------------------------------------------------------------------------ (add/remove: 1/1 grow/shrink: 3/4 up/down: 282/-59) Total: 223 bytes
2009-04-10hush: tighten up "for" variable name check.Denis Vlasenko
Add TODOs. Disable redir4.right part where we differ from bash. It is not a bug per standards. Add a few tests, one is in hush-bugs section: and_or_and_backgrounding.right. It will likely bite users in real world usage.
2009-04-10hush: readability improvements.Denis Vlasenko
fix some more obscure bugs. a new redir4.tests is known to fail.
2009-04-09add test cases for parameter substitution with unset/null stringsMike Frysinger
2009-04-09hush: deal with some easier TODOsDenis Vlasenko
function old new delta is_well_formed_var_name - 87 +87 builtin_read 49 86 +37 die_if_script - 31 +31 syntax_error_unterminated - 28 +28 syntax_error 26 51 +25 done_word 768 788 +20 syntax_error_at - 12 +12 parse_stream_dquoted 320 328 +8 expand_variables 2064 2063 -1 run_list 1225 1220 -5 add_till_closing_paren 308 303 -5 add_till_backquote 111 106 -5 handle_dollar 812 803 -9 parse_stream 2378 2356 -22 parse_redirect 408 372 -36 maybe_die 44 - -44 is_assignment 215 134 -81 ------------------------------------------------------------------------------ (add/remove: 4/1 grow/shrink: 4/8 up/down: 248/-208) Total: 40 bytes
2009-04-09hush: plug the leak of expanded heredocDenis Vlasenko
2009-04-09hush: fix EXIT trap recursion case; check redirection failuresDenis Vlasenko
function old new delta run_pipe 1299 1328 +29 hush_exit 90 102 +12 hush_main 1172 1179 +7 run_list 1226 1225 -1 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 3/1 up/down: 48/-1) Total: 47 bytes
2009-04-09skip some tests when fancy echo support is turned offMike Frysinger
2009-04-09we arent testing `echo -n` here so use printf insteadMike Frysinger
2009-04-09source the .config so tests can signal they need to be skipped due to ↵Mike Frysinger
feature disable
2009-04-08hush: more rodust detection of unterminated strings etc;Denis Vlasenko
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-08expand leak_all1.testsDenis Vlasenko
2009-04-08hush: add a leak test which currently failsDenis Vlasenko
2009-04-08hush: add leak detector helper; fix/add tests for itDenis Vlasenko
function old new delta builtin_memleak - 92 +92 bltins 288 300 +12
2009-04-08hush: echo \2>file fixDenis Vlasenko
2009-04-07hush: fix heredoc expansion of $var and `cmd`Denis Vlasenko
function old new delta expand_pseudo_dquoted - 104 +104 setup_heredoc 215 275 +60 done_word 669 691 +22 parse_stream 1899 1902 +3 setup_redirects 196 191 -5 free_pipe 189 183 -6 expand_variables 2349 2229 -120 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 3/3 up/down: 189/-131) Total: 58 bytes
2009-04-07use sleep rather than usleepMike Frysinger
2009-04-07add a pathological test case for here doc related to eof marker and other ↵Mike Frysinger
ugly corner cases
2009-04-07implement support for parameter substitution via #/% operatorsMike Frysinger
2009-04-07hush: heredoc support, based on patch by Mike Frysinger (vapier AT gentoo.org)Denis Vlasenko
some TODOs are to be attacked later function old new delta parse_stream 1461 1866 +405 parse_redirect - 265 +265 setup_heredoc - 116 +116 setup_redirects 151 196 +45 builtin_exit 49 47 -2 redirect_opt_num 61 55 -6 setup_redirect 212 - -212 ------------------------------------------------------------------------------ (add/remove: 2/1 grow/shrink: 2/2 up/down: 831/-220) Total: 611 bytes
2009-04-06hush: fix "if false; then...fi" exitcode;Denis Vlasenko
trim "keyword"-less hush by 10 bytes
2009-04-06make hush-misc/*.tests executableDenis Vlasenko
2009-04-06hush: fix a bunch of obscure while/until/continue bugsDenis Vlasenko
function old new delta run_list 1159 1214 +55 done_pipe 106 123 +17 done_command 86 98 +12 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 3/0 up/down: 84/0) Total: 84 bytes
2009-04-06*.tests should be executableDenis Vlasenko
2009-04-06move hush-parsing/and-or.tests to hush-misc/*Denis Vlasenko
(which probably needs to be renamed to hush-execution...)
2009-04-06add some brute force logic testsMike Frysinger
2009-04-06add tests for basic fd open/close/dupeMike Frysinger
2009-04-06fix redir1 tests -- usleep isnt standard in $PATHMike Frysinger
2009-04-05fixing mode on hush-leak/leak_argv1.testsDenis Vlasenko
2009-04-05fixing mode on hush-leak/leak_argv1.testsDenis Vlasenko
2009-04-05hush: fix passing of $n on NOMMUDenis Vlasenko
2009-04-04hush: fix "var=val >file" not creating fileDenis Vlasenko
function old new delta static.null_ptr - 4 +4 run_list 2018 2020 +2 handle_dollar 667 626 -41 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 1/1 up/down: 6/-41) Total: -35 bytes
2009-04-03hush: finally make `cmd` safe on NOMMUDenis Vlasenko
function old new delta generate_stream_from_string - 157 +157 expand_variables 2050 2003 -47 generate_stream_from_list 139 - -139 ------------------------------------------------------------------------------ (add/remove: 1/1 grow/shrink: 0/1 up/down: 157/-186) Total: -29 bytes
2009-04-03hush: improve parse_stream: does not require parsing context struct;Denis Vlasenko
cleans up on syntax errors (we used to leak memory in this case); much simplified interface to the rest of hush. function old new delta parse_stream 1204 1447 +243 done_word 658 669 +11 static_get 22 28 +6 builtin_source 84 89 +5 parse_and_run_file 27 30 +3 parse_and_run_string 31 27 -4 builtin_eval 55 50 -5 hush_main 991 985 -6 free_pipe_list 39 31 -8 free_pipe 210 189 -21 expand_variables 2242 2199 -43 parse_and_run_stream 289 153 -136 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 5/7 up/down: 268/-223) Total: 45 bytes