* lisp/ob-shell.el (org-babel--variable-assignments:bash): Do not
error when value is a list.
* testing/lisp/test-ob-shell.el (ob-shell/simple-list): New test.
Reported-by: Keith Amidon <camalot@picnicpark.org>
<http://permalink.gmane.org/gmane.emacs.orgmode/113920>
* lisp/ob-shell.el: added support to serialize vars as arrays or associative arrays as appropriate if it is using bash.
* testing/examples/ob-shell-test.org: a file containing a few code blocks both illustrating the use of arrays as well as serving as test for the new export functionality.
* testing/lisp/test-ob-shell.el: added a few unit tests that verify that this new logic only triggers for bash and no other shell at this time.
When variables are defined in a 'sh' code block, they are exported as strings. when the variable itself is an array or a table, then we simply get a shell variable that contains the list of all values in a non-structured form.
When calling the code block with bash, however, it will now export the list as an array, the table as an associative array. A scalar is exported the same way as before.
Signed-off-by: Pascal Fleury <fleury@google.com>