File: hash.bsh

package info (click to toggle)
bsh 2.0b4-15
  • links: PTS, VCS
  • area: main
  • in suites: jessie-kfreebsd
  • size: 4,212 kB
  • sloc: java: 23,430; xml: 4,500; sh: 139; makefile: 30
file content (17 lines) | stat: -rw-r--r-- 338 bytes parent folder | download | duplicates (11)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/bin/java bsh.Interpreter

source("TestHarness.bsh");

h = new java.util.Hashtable();
h.put("foo", "bar");
assert( h.get("foo").equals("bar") );

h{"foo"}="gee";
assert( h{"foo"}.equals("gee") );

// Maps work when CollectionManager is present
Map map = new HashMap();
map{"foo"}="bar";
assert( map{"foo"}.equals("bar") );

complete();