Permalink
Browse files

use process.execPath not ./bin/vows. This is consistent with how exec…

… works in vows and works on windows. Use os.EOL to check oh no string so it works on platforms that use \r\n
  • Loading branch information...
1 parent d728652 commit 304643f2f5ab73c6bbde2b24e0ab32a9d2aa409c @stammen stammen committed Nov 15, 2012
Showing with 4 additions and 3 deletions.
  1. +4 −3 test/isolate-test.js
@@ -1,15 +1,16 @@
var vows = require('../lib/vows'),
assert = require('assert'),
path = require('path'),
+ os = require('os'),
exec = require('child_process').exec;
function generateTopic(args, file) {
return function () {
- var cmd = './bin/vows' + ' -i ' + (args || '') +
+ var cmd = '"' + process.execPath + '"' + ' ./bin/vows' + ' -i ' + (args || '') +
' ./test/fixtures/isolate/' + file,
options = {cwd: path.resolve(__dirname + '/../')},
callback = this.callback;
-
+ console.log(cmd);
exec(cmd, options, function (err, stdout, stderr) {
callback(null, {
err: err,
@@ -95,7 +96,7 @@ vows.describe('vows/isolate').addBatch({
'should be ok': assertExecOk,
'should have stderr': function (r) {
assert.equal(r.stderr,
- ['oh no!', 'oh no!', 'oh no!', 'oh no!', ''].join('\n'));
+ ['oh no!', 'oh no!', 'oh no!', 'oh no!', ''].join(os.EOL));
},
'should have correct output': function (r) {
var results= parseResults(r.stdout);

0 comments on commit 304643f

Please sign in to comment.