Skip to content

Commit

Permalink
remove os.EOL for strerr test. Only removed first result if not json
Browse files Browse the repository at this point in the history
  • Loading branch information
stammen committed Nov 16, 2012
1 parent aace8dd commit 7f8d511
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions test/isolate-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 7f8d511

Please sign in to comment.