File: sourcereturn.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 (19 lines) | stat: -rw-r--r-- 324 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
#!/bin/java bsh.Interpreter

source("TestHarness.bsh");

// Note: no import needed here because the source() handled it.
assert( source("Data/actionHandler.bsh") instanceof ActionListener );

// check source scope
a=0;
foo() {
	source("Data/run_aux.bsh");
	assert( a==5 );
}
assert(a==0);
foo();
assert(a==0);

complete();