File: run.bsh

package info (click to toggle)
bsh 2.0b4-8
  • links: PTS, VCS
  • area: main
  • in suites: lenny
  • size: 4,072 kB
  • ctags: 3,680
  • sloc: java: 23,424; xml: 4,484; sh: 134; makefile: 21
file content (33 lines) | stat: -rw-r--r-- 778 bytes parent folder | download | duplicates (11)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/bin/java bsh.Interpreter

source("TestHarness.bsh");

// basic stuff
a=1;
global.g = 7;
r = run("Data/run_aux.bsh");
assert( a==1 );
assert( r.a == 5 );
// run_aux does sets global g to 6, it should not appear here 
assert( global.g == 7 );
assert( r.g == 6 );

// Note: this could fail legitimately if we're not in the test dir...
assert( r.cwd != void );
assert( !r.cwd.equals( bsh.cwd) );

arg = object();
arg.foo=1;
r = run("Data/run_aux.bsh", arg);
// run_aux copies runArgument to ra 
assert( r.ra.foo == 1 );

// test that classloading doesn't affect us
r=run("Data/run_aux2.bsh");
assert( r.c == 5 );
assert( isEvalError("new AddClass()") );
// should show no class loading...
//this.namespace.getClassManager().dump( new PrintWriter(System.out,true));

complete();