On Fri, Dec 14, 2012 at 3:06 AM, Roland Mainz <[email protected]> wrote:
> While testing multi-dimensional enum arrays wit ast-ksh.2012-11-21 I
> hit the following issue:
> -- snip --
> $ ~/bin/ksh -c $'enum bb=( ya ba ) ; \ncompound c=( bb -a ar=(
> [4][5]=ba ) ) ; print -v c'
> /home/test001/bin/ksh[2]: bb: line 1: c.c.ar[4]=: no parent
> (
> bb -a ar=(
> [4]=ya
> )
> )
> -- snip --
>
> Both the 2nd dimension ([5]) is gone and the value is wrong ("ya"
> instead of the expected "ba").
>
> AFAIK the expected stdout output should look like this:
> -- snip --
> (
> bb -a ar=(
> [4]=(
> [5]=ba
> )
> )
> )
> -- snip --
Here is a variation of the test (expected output is the same as above)
which adds usage of $ read -C ... # to the equation (for better test
coverage):
-- snip --
$ ~/bin/ksh -c $'enum bb=( ya ba ) ; \ncompound c=( bb -a ar=( [4]=(
[5]=ba ) ) ) ; print -v c | read -C d ; print -v d'
/home/test001/bin/ksh[2]: bb: line 1: c.c.ar[4]=: no parent
/home/test001/bin/ksh[2]: read[4]: bb: line 1: d.d.ar[4]=ya: no parent
(
bb -a ar=(
[4]=ya
)
)
-- snip --
----
Bye,
Roland
--
__ . . __
(o.\ \/ /.o) [email protected]
\__\/\/__/ MPEG specialist, C&&JAVA&&Sun&&Unix programmer
/O /==\ O\ TEL +49 641 3992797
(;O/ \/ \O;)
_______________________________________________
ast-developers mailing list
[email protected]
http://lists.research.att.com/mailman/listinfo/ast-developers