From 906bbb38dc6dd2cf9f2d255caa819cf2e5e17bd3 Mon Sep 17 00:00:00 2001 From: coderaiser Date: Tue, 12 Jun 2012 14:38:17 +0000 Subject: [PATCH] added some shell comands --- test/test.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/test/test.js b/test/test.js index d6e1f4fe..4def62d5 100644 --- a/test/test.js +++ b/test/test.js @@ -8,7 +8,7 @@ exec('curl http://phantomjs.googlecode.com/files/phantomjs-1.5.0-linux-x86-dynam var _1 = function(){exec('tar -zxf phantomjs-1.5.0-linux-x86-dynamic.tar.gz',makeExecFunctoin(_2));} var _2 = function(){exec('./phantomjs/bin/phantomjs',makeExecFunctoin(_3));}; var _3 = function(){exec('ls',makeExecFunctoin());}; - +var i; function makeExecFunctoin(pFunc){ return function(error, stdout, stderr) { console.log('stdout: ' + stdout); @@ -18,7 +18,9 @@ function makeExecFunctoin(pFunc){ console.log('exec error: ' + error); } else if(pFunc && - typeof pFunc==='function') - pFunc(); + typeof pFunc==='function'){ + console.log(i++); + pFunc(); + } }; } \ No newline at end of file