#!/bin/java bsh.Interpreter

source("TestHarness.bsh");

foo() {
	run() {
		flag();
		for(int i=0; i<5; i++) {
			print(i);
			Thread.sleep(100);
		}
	}
	return this;
}

t=new Thread( foo() );
t.start();
print("after");
t.join();
assert(flag()==1);

complete();

