private void runTest(File path) {
        mOutput = 0;
        System.out.println(path.toString());
        
        try {            
            LarkScript script = new LarkScript(path.getPath());
            
            mPassed = true;
            
            // parse the script to get the expected behavior
            mExpectedOutput = new LinkedList<String>();
            String expectedResult = "";
            
            for (String line : script.getSource().split("\r\n|\r|\n")) {
                if (line.contains(OUTPUT_PREFIX)) {
                    int start = line.indexOf(OUTPUT_PREFIX) + OUTPUT_PREFIX.length();
                    mExpectedOutput.add(line.substring(start));
                }
                else if (line.contains(RESULT_PREFIX)) {
                    int start = line.indexOf(RESULT_PREFIX) + RESULT_PREFIX.length();
                    expectedResult = line.substring(start);
                }
            }
            
            Interpreter interpreter = new Interpreter(new TestHost());
            
            // load the base script
            //### bob: hack. assumes relative path.
            LarkScript base = new LarkScript("base/init.lark");
            base.run(interpreter);

            // run the script
            mRunning = true;
            Expr resultExpr = script.run(interpreter);
            mRunning = false;
            
            // check the result
            if (resultExpr == null) {
                System.out.println("- fail: got null expression");
                mPassed = false;
                
            } else if ((expectedResult.length() > 0) && !expectedResult.equals(resultExpr.toString())) {
                System.out.println("- fail: result was '" + resultExpr.toString() + "', expected '" + expectedResult + "'");
                mPassed = false;
            }
            
            // see if we missed output
            for (String expected : mExpectedOutput) {
                System.out.println("- fail: expected '" + expected + "' but got nothing");
            }
        }
        catch (IOException ex) {
            System.out.println("- fail: got exception loading test script");
            mPassed = false;
        }
        
        System.out.println("- passed " + mOutput + " lines of output");
        
        mTests++;
        if (mPassed) mPasses++;
    }