mirror of
https://github.com/go-sylixos/elvish.git
synced 2024-12-05 03:17:50 +08:00
13 lines
267 B
Go
13 lines
267 B
Go
package eval
|
|
|
|
import "testing"
|
|
|
|
func TestAssignment(t *testing.T) {
|
|
Test(t,
|
|
That("x = a; put $x").Puts("a"),
|
|
That("x = [a]; x[0] = b; put $x[0]").Puts("b"),
|
|
That("x = a; { x = b }; put $x").Puts("b"),
|
|
That("x = [a]; { x[0] = b }; put $x[0]").Puts("b"),
|
|
)
|
|
}
|