{"baseball", "hiking", "soccer", "ski"},
{"snow", "sleet", "drizzle", "rain"},
{"cypress", "hemlock", "spruce"}};
result = instance.getVariables();
for (int i=0; i<result.size(); i++) {
BiVariable var = result.get(i);
assertArrayEquals(extResult[i], (String[]) var.getJavaObject());
}
assertTrue(result.size() == 5);
container = new ScriptingContainer(LocalContextScope.SINGLETHREAD, LocalVariableBehavior.GLOBAL);
instance = container.getVarMap();
container.put("ARGV", new String[] {"spring", "fall"});
container.put("SEASON", new String[] {"summer", "winter"});
container.put("$sports", new String[] {"baseball", "hiking", "soccer", "ski"});
container.put("@weather", new String[] {"snow", "sleet", "drizzle", "rain"});
container.put("trees", new String[] {"cypress", "hemlock", "spruce"});
String[][] extResult2 = {{"spring", "fall"},
{"summer", "winter"},
{"cypress", "hemlock", "spruce"}};
result = instance.getVariables();
for (int i=0; i<result.size(); i++) {
BiVariable var = result.get(i);
assertArrayEquals(extResult2[i], (String[]) var.getJavaObject());
}
assertTrue(result.size() == 3);
}