Updates:
Status: Accepted
Labels: -Type-Defect Type-Enhancement Target-2.7
Comment #1 on issue 1059 by pekka.klarck: Assignment of a variable using
extended variable syntax creates a new test variable with the same name
http://code.google.com/p/robotframework/issues/detail?id=1059
I agree this would be handy and find it surprising nobody has requested
this earlier. Because I got a feeling this would be pretty immediately
useful at least in one project at NSN and implementing this is pretty
straightforward, I try to get this into 2.7.
I actually already prototyped this and a simple patch that makes the the
original example pass is attached. There are some open issues to be
discussed before this can be fully implemented:
1) When assigning to variable ${foo.bar}, what to do if variable ${foo.bar}
already exists? Probably we should just reassign it.
2) When assigning to variable ${foo.bar}, what to do if there is no
${foo.bar} but no no ${foo} either? Should we fail or create ${foo.bar}
variable?
3) How to handle ${foo.bar.zap}? It would probably be easiest to assign zap
to ${foo.bar}.
Attachments:
extended_assign.patch 794 bytes