#!/bin/java bsh.Interpreter

source("TestHarness.bsh");

print("undefined variable void assignment:");
assert( isEvalError("a = booga;") );

print("Undefined static method access:");
assert( isEvalError("java.lang.System.booga();") );

print("Another undefined static method access:");
assert( isEvalError("System.booga();") );

print("undefined static field access:");
assert( isEvalError("java.lang.System.booga;") );

print("undefined static field access with assign:");
assert( isEvalError("b = java.lang.System.booga;") );

print("Another undefined static field access:");
assert( isEvalError("System.booga;") );

// should be ok
assert( ! isEvalError("System.out;") );

//This was causing strange parser failures... should be simple parser exception
assert( isEvalError("static import Foo.*;" ) );

complete();
