Skip to content

Commit

Permalink
Might as well test, array within array index test
Browse files Browse the repository at this point in the history
  • Loading branch information
Kartik Thakore committed Feb 13, 2013
1 parent 3bd6929 commit 51326ab
Showing 1 changed file with 6 additions and 0 deletions.
Expand Up @@ -82,6 +82,12 @@ class ArrayHashIndexingTestSuite extends FunSuite with BeforeAndAfter with Parse
assert(result.asInstanceOf[MoeIntObject].getNativeValue === 3);
}

test("... basic test with a complex example (array index providing array index)") {
val result = interpretCode(""" my @x = [1, 2, 3]; my @y = [ 1, 2]; @x[ @y[1] ] """)

assert(result.asInstanceOf[MoeIntObject].getNativeValue === 3);
}

test("... basic test with a complex example (hash index providing hash index)") {
val result = interpretCode(""" my %x = { one => 1, two => 2 }; my %y = { '1' => "one", '2' => "two" }; %x{ %y{"2"} } """)

Expand Down

0 comments on commit 51326ab

Please sign in to comment.