Skip to content
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,5 @@ node_js:
- "iojs-3"
- "4"
- "5"
before_script: "which npm"
script: "npm test"
1 change: 1 addition & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ install:
- node --version
- npm --version
- npm install
- where npm

# build
build: off
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
{
"dependencies": {
"iswin": "0.0.2",
"touch": "^1.0.0"
},
"scripts": {
"test": "npm run touch1",
"test": "npm run touch1 --verbose && node test.js",
"touch1": "touch foo.txt"
}
}
15 changes: 14 additions & 1 deletion test.js
Original file line number Diff line number Diff line change
@@ -1 +1,14 @@
process.exit(1);
var spawn = require('child_process').spawn;
var iswin = require('iswin');
console.log('process.cwd()');
console.log(process.cwd());
console.log('process.env.PATH');
console.log(process.env.PATH);
console.log('process.env.PATHEXT');
console.log(process.env.PATHEXT);
var cmd = (iswin()) ? 'npm.cmd' : 'npm';
var touch1 = spawn(cmd, ['run', 'touch1', '--verbose'], { stdio: 'inherit' });
touch1.on('error', function(err) {
console.error(err);
process.exit(1);
});