fix concat test on windows

v1.18.x
Baris Usakli 8 years ago
parent e1a42a49b6
commit d1dd0cd6df

@ -174,7 +174,7 @@ function concat(data, callback) {
return callback(err); return callback(err);
} }
var output = files.join('\n;'); var output = files.join(os.EOL + ';');
fs.writeFile(data.destPath, output, callback); fs.writeFile(data.destPath, output, callback);
}); });

@ -3,6 +3,7 @@
var string = require('string'); var string = require('string');
var path = require('path'); var path = require('path');
var fs = require('fs'); var fs = require('fs');
var os = require('os');
var assert = require('assert'); var assert = require('assert');
var mkdirp = require('mkdirp'); var mkdirp = require('mkdirp');
var rimraf = require('rimraf'); var rimraf = require('rimraf');
@ -42,16 +43,15 @@ describe('minifier', function () {
assert.strictEqual( assert.strictEqual(
fs.readFileSync(destPath).toString(), fs.readFileSync(destPath).toString(),
'(function (window, document) {' + '(function (window, document) {' + os.EOL +
'\n\twindow.doStuff = function () {' + '\twindow.doStuff = function () {' + os.EOL +
'\n\t\tdocument.body.innerHTML = \'Stuff has been done\';' + '\t\tdocument.body.innerHTML = \'Stuff has been done\';' + os.EOL +
'\n\t};' + '\t};' + os.EOL +
'\n})(window, document);' + '})(window, document);' + os.EOL +
'\n' + os.EOL +
'\n;function foo(name, age) {' + ';function foo(name, age) {' + os.EOL +
'\n\treturn \'The person known as "\' + name + \'" is \' + age + \' years old\';' + '\treturn \'The person known as "\' + name + \'" is \' + age + \' years old\';' + os.EOL +
'\n}' + '}' + os.EOL
'\n'
); );
done(); done();
}); });

Loading…
Cancel
Save