describe("process running tests",
{
    test_process_object_as_async: function(test)
    {
		value_of(Titanium.Process).should_not_be_null();
		var p = null;
		
		if (Titanium.platform == 'win32')
		{
		    // open a shell and leave it open
			p = Titanium.Process.launch('C:\\Windows\\system32\\cmd.exe',['/K', 'dir']);
		}
		else
		{
		    // on non-windows platforms, we launch using CAT to just let it sit and wait for input.
			p = Titanium.Process.launch('/bin/cat',['-v']);
		}

		var timer = null;
		var shortTimer = null;
		value_of(p).should_not_be_null();

        value_of(p.command).should_not_be_null();
        value_of(p.err).should_not_be_null();
        value_of(p['in']).should_not_be_null();
        value_of(p['out']).should_not_be_null();
        value_of(p.terminate).should_be_function();
        value_of(p.pid).should_be_object();
        
		p.onread = function(buf)
		{
		    // reality check... are we running?
            value_of(this.running).should_be_true();
		};

		p.onexit = function()
		{
			clearTimeout(timer);

            // we should not be running on exit.  
			if (this.running)
			{
				test.failed('test is running onexit, should be running');
			}
			else
			{
				test.passed();
			}
		};
		shortTimer = setTimeout(function()
		{
		    // reality check... are we running?
            value_of(p.running).should_be_true();
		
	        // kill the process if it's running
	        p.terminate();
		}, 1000);

        // if we hit this timeout, then we fail.		
		timer = setTimeout(function()
		{
			test.failed('timed out');
		},5000);
    }
});

@@ -29,20 +29,17 @@
 sts%22,%0A%7B%0A
-    
+%09
 test_pro
@@ -75,20 +75,17 @@
 n(test)%0A
-    
+%09
 %7B%0A%09%09valu
@@ -186,28 +186,25 @@
 n32')%0A%09%09%7B%0A%09%09
-    
+%09
 // open a sh
@@ -322,20 +322,17 @@
 e%0A%09%09%7B%0A%09%09
-    
+%09
 // on no
@@ -549,24 +549,18 @@
 ull();%0A%0A
-        
+%09%09
 value_of
@@ -589,32 +589,26 @@
 _be_null();%0A
-        
+%09%09
 value_of(p.e
@@ -629,32 +629,26 @@
 _be_null();%0A
-        
+%09%09
 value_of(p%5B'
@@ -671,32 +671,26 @@
 _be_null();%0A
-        
+%09%09
 value_of(p%5B'
@@ -714,32 +714,26 @@
 _be_null();%0A
-        
+%09%09
 value_of(p.t
@@ -764,24 +764,18 @@
 tion();%0A
-        
+%09%09
 value_of
@@ -796,26 +796,20 @@
 _be_
-object();%0A        
+number();%0A%09%09
 %0A%09%09p
@@ -830,36 +830,33 @@
 tion(buf)%0A%09%09%7B%0A%09%09
-    
+%09
 // reality check
@@ -871,36 +871,27 @@
 we running?%0A
-            
+%09%09%09
 value_of(thi
@@ -978,28 +978,19 @@
 imer);%0A%0A
-            
+%09%09%09
 // we sh
@@ -1198,20 +1198,17 @@
 )%0A%09%09%7B%0A%09%09
-    
+%09
 // reali
@@ -1239,20 +1239,11 @@
 ng?%0A
-            
+%09%09%09
 valu
@@ -1280,24 +1280,18 @@
 ();%0A%09%09%0A%09
-        
+%09%09
 // kill 
@@ -1319,24 +1319,18 @@
 unning%0A%09
-        
+%09%09
 p.termin
@@ -1353,16 +1353,10 @@
 );%0A%0A
-        
+%09%09
 // i
@@ -1474,12 +1474,9 @@
 0);%0A
-    
+%09
 %7D%0A%7D)

Fix for the process_running test