Update dateFile EOL usage to be consistent with appender.
From the looks of the Travis CI failure, this could be the issue causing failures. Not sure as I can't reproduce locally. However, it is still an inconsistency and worth fixing.
This commit is contained in:
parent
633ed3cddb
commit
3b5eb28115
@ -4,7 +4,8 @@ var vows = require('vows')
|
||||
, path = require('path')
|
||||
, fs = require('fs')
|
||||
, sandbox = require('sandboxed-module')
|
||||
, log4js = require('../lib/log4js');
|
||||
, log4js = require('../lib/log4js')
|
||||
, EOL = require('os').EOL || '\n';
|
||||
|
||||
function removeFile(filename) {
|
||||
return function() {
|
||||
@ -134,7 +135,7 @@ vows.describe('../lib/appenders/dateFile').addBatch({
|
||||
teardown: removeFile('date-file-test.log'),
|
||||
|
||||
'should load appender configuration from a json file': function(err, contents) {
|
||||
assert.include(contents, 'this should be written to the file' + require('os').EOL);
|
||||
assert.include(contents, 'this should be written to the file' + EOL);
|
||||
assert.equal(contents.indexOf('this should not be written to the file'), -1);
|
||||
}
|
||||
},
|
||||
@ -161,7 +162,7 @@ vows.describe('../lib/appenders/dateFile').addBatch({
|
||||
, thisTime = format.asString(options.appenders[0].pattern, new Date());
|
||||
fs.writeFileSync(
|
||||
path.join(__dirname, 'date-file-test' + thisTime),
|
||||
"this is existing data" + require('os').EOL,
|
||||
"this is existing data" + EOL,
|
||||
'utf8'
|
||||
);
|
||||
log4js.clearAppenders();
|
||||
|
Loading…
Reference in New Issue
Block a user