Skip to content

Commit b51cf98

Browse files
Merge pull request #3 from zcbenz/master
On windows lines are sperated by \r\n.
2 parents c0d3da7 + c816acd commit b51cf98

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

lib/parse-output.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ var expressions = {
2525
function parseOutput(output, next) {
2626
var error,
2727
report = {},
28-
lines = output.split('\n').filter(function (line) {
28+
lines = output.split(/\r?\n/).filter(function (line) {
2929
if (line) {
3030
return true;
3131
}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
"node": "*"
2626
},
2727
"scripts": {
28-
"test": "grunt jslint && node node_modules/.bin/vows test/*.js --spec"
28+
"test": "grunt jslint && node node_modules/vows/bin/vows test/*.js --spec"
2929
},
3030
"keywords": [
3131
"cpplint",

test/make-args.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ var vows = require('vows');
66

77
var assert = require('assert');
88

9+
var path = require('path');
10+
911
var makeArgs = require('../lib/make-args.js').makeArgs;
1012

1113
var filter = require('../lib/make-args.js').filter;
@@ -112,7 +114,8 @@ suite.addBatch({
112114
]
113115
}),
114116
'first arg should contain "cpplint/cpplint.py"': function (err, args) {
115-
assert.includes(args[0], 'cpplint/cpplint.py');
117+
var cpplintpy = path.join('cpplint', 'cpplint.py');
118+
assert.includes(args[0], cpplintpy);
116119
},
117120
'should pass the correct verbose value': function (err, args) {
118121
assert.includes(args, '--verbose=1');

0 commit comments

Comments
 (0)