-- $LastChangedDate: 2010-04-10 22:33:17 -0400 (Sat, 10 Apr 2010) $
-- Common functions for testing.

function LoadScript( filename )
    local paths = {
        "../../scripts/", "../scripts/", "scripts/",  -- Palomino 3
        "../../bin/", "../bin/", "bin/",              -- Palomino 4
        "../../src/lua_scripts",                      -- Palomino 4
    }
    for k,path in pairs(paths) do
        if ( pcall( function() dofile( path .. "/" .. filename ) end ) ) then
            return
        end
    end
    -- Failed.
    assert( false )
end
