Skip to content

Commit

Permalink
Merge pull request #1252 from stephenplusplus/spp--windows-clrf-tests
Browse files Browse the repository at this point in the history
normalize new lines for Vision test
  • Loading branch information
callmehiphop committed Apr 19, 2016
2 parents b338fb1 + 84c7216 commit 66394c1
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@
"mockery-next": "^2.0.1-3",
"multiline": "^1.0.2",
"node-uuid": "^1.4.3",
"normalize-newline": "^2.0.0",
"tmp": "0.0.27"
},
"scripts": {
Expand Down
6 changes: 4 additions & 2 deletions system-test/storage.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ var assert = require('assert');
var async = require('async');
var crypto = require('crypto');
var fs = require('fs');
var normalizeNewline = require('normalize-newline');
var prop = require('propprop');
var request = require('request');
var through = require('through2');
Expand Down Expand Up @@ -569,8 +570,9 @@ describe('storage', function() {
}
};

var expectedContents = fs.readFileSync(FILES.html.path, 'utf-8')
.replace(/\r\n/g, '\n'); // Normalize line endings.
var expectedContents = normalizeNewline(
fs.readFileSync(FILES.html.path, 'utf-8')
);

bucket.upload(FILES.gzip.path, options, function(err, file) {
assert.ifError(err);
Expand Down
5 changes: 3 additions & 2 deletions system-test/vision.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
var assert = require('assert');
var is = require('is');
var multiline = require('multiline');
var normalizeNewline = require('normalize-newline');
var path = require('path');

var env = require('./env.js');
Expand Down Expand Up @@ -311,12 +312,12 @@ describe('Vision', function() {

describe('text', function() {
var expectedResults = [
multiline.stripIndent(function() {/*
normalizeNewline(multiline.stripIndent(function() {/*
Google Cloud Client Library for Node.js an idiomatic, intuitive, and
natural way for Node.js developers to integrate with Google Cloud
Platform services, like Cloud Datastore and Cloud Storage.
*/})
*/}))
];

expectedResults = expectedResults.concat(
Expand Down

0 comments on commit 66394c1

Please sign in to comment.