mv test.sh to test folder

This commit is contained in:
coderaiser 2012-06-14 14:35:53 +00:00
parent 8addd9bdc6
commit 6afa63fb38
5 changed files with 14 additions and 34 deletions

10
test/.jshintrc Normal file
View file

@ -0,0 +1,10 @@
{
"validthis": true,
"laxcomma" : true,
"laxbreak" : true,
"browser" : true,
"debug" : true,
"boss" : true,
"expr" : true,
"asi" : true
}

View file

@ -1,26 +0,0 @@
var util = require('util'),
exec = require('child_process').exec;
exec('curl http://phantomjs.googlecode.com/files/phantomjs-1.5.0-linux-x86-dynamic.tar.gz',makeExecFunctoin(_1));
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);
console.log('stderr: ' + stderr);
if (error !== null) {
console.log('exec error: ' + error);
}
else if(pFunc &&
typeof pFunc==='function'){
console.log(i++);
pFunc();
}
};
}

View file

@ -1,4 +1,3 @@
#!/bin/sh
curl http://phantomjs.googlecode.com/files/phantomjs-1.5.0-linux-x86-dynamic.tar.gz
tar -zxf phantomjs-1.5.0-linux-x86-dynamic.tar.gz
./phantomjs/bin/phantomjs
#!/bin/sh
npm install -g jshint
jshint *.js --config .jshintrc