busybox/shell/ash_test
Ron Yorston 95ebcf79ff ash: add support for bash 'function' keyword
Where the POSIX shell allows functions to be defined as:

   name () compound-command [ redirections ]

bash adds the alternative syntax:

   function name [()] compound-command [ redirections ]

Implement this in ash's bash compatibility mode.  Most compound
commands work (for/while/until/if/case/[[]]/{}); one exception is:

   function f (echo "no way!")

The other two variants work:

   f() (echo "ok")
   function f() (echo "also ok")

function                                             old     new   delta
parse_command                                       1555    1744    +189
tokname_array                                        232     240      +8
.rodata                                           155612  155566     -46
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 2/1 up/down: 197/-46)           Total: 151 bytes

Signed-off-by: Ron Yorston <rmy@pobox.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2015-11-04 19:30:24 +01:00
..
ash-alias
ash-arith
ash-glob ash,hush: add a test which fails for ash since commit 549deab 2015-09-04 03:33:02 +02:00
ash-heredoc ash: fix error during recursive processing of here document 2015-10-29 20:45:36 +01:00
ash-invert
ash-misc ash: add support for bash 'function' keyword 2015-11-04 19:30:24 +01:00
ash-quoting
ash-read
ash-redir ash: fix a bug in >${varexp} handling. Closes 5282 2012-06-09 02:06:57 +02:00
ash-signals slightly better wording in comments 2011-02-21 03:47:50 +01:00
ash-standalone
ash-vars testsuite: add some tests for ash 2015-05-18 10:13:21 +02:00
printenv.c
recho.c
run-all ash tests: make test print test name before it is run 2015-10-29 20:34:20 +01:00
zecho.c