Permalink
Browse files

remove os.EOL for strerr test. Only removed first result if not json

  • Loading branch information...
1 parent aace8dd commit 7f8d5119bc393b8e497d15587444194f57da59ce @stammen stammen committed Nov 16, 2012
Showing with 8 additions and 2 deletions.
  1. +8 −2 test/isolate-test.js
View
10 test/isolate-test.js
@@ -32,9 +32,15 @@ function assertExecNotOk(r) {
function parseResults(stdout) {
var results = stdout.split('\n');
+
// win32 returns cmd. need to filter out
if(process.platform === 'win32') {
- results.shift();
+
+ try {
+ JSON.parse(results[0])
+ } catch(e){
+ results.shift();
+ }
}
return results.map(function (s) {
@@ -103,7 +109,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(os.EOL));
+ ['oh no!', 'oh no!', 'oh no!', 'oh no!', ''].join('\n'));
},
'should have correct output': function (r) {
var results= parseResults(r.stdout);

0 comments on commit 7f8d511

Please sign in to comment.