How do I access a script variable from a class defined within that script?

I’m pretty sure I’m being very dim here but I have a unity script which contains some script variables and also some classes. In the functions of one of the classes I want to access the script variables.
I’ve simplified my script down to the following example that shows what I want to do:

#pragma strict
var testInt: int = 1;

class TestClass {
    function testFunc() {
        Debug.Log("testInt is " + testInt);
var testClass: TestClass;

function Awake() {
    // Instantiate the class
    testClass = new TestClass();

function Update () {

but I get the error “TestVarClass.js(6,35): BCE0005: Unknown identifier: ‘testInt’.”

Is there a simple way to access testInt inside TestClass? I realise I could pass it in as a parameter but this is not practical in my actual script that is more complex than the above.
Thanks in advance.

One reason you would nest a class within another class is because you need to store data into a container for use within that class (Most of the time).

But the container should not be aware of the nesting class, it just doe its own thing.
In here you TestClass trying to access a variable from the nesting class, though it may be possible via some hack, it also means you have a flaw in your design. A class is meant to do things about itself. So your printing should be in the parent class. If you need to access also info from the nested class then do it in the parent class:

class TestClass
   var data:int;

var testClass:TestClass;
var info:int;
function Start()
    info = 10;
    testClass = new TestClass(); = 20;

function PrintOut()
     Debug.Log( + " " + info);