asar/test/util/compareFileLists.js

13 строки
356 B
JavaScript
Исходник Постоянная ссылка Обычный вид История

'use strict';
2019-02-19 00:22:45 +03:00
const assert = require('assert');
const os = require('os');
2019-02-19 00:22:45 +03:00
module.exports = function compareFileLists(actual, expected) {
2019-02-19 00:22:45 +03:00
// on windows replace slashes with backslashes and crlf with lf
if (os.platform() === 'win32') {
expected = expected.replace(/\//g, '\\').replace(/\r\n/g, '\n');
2019-02-19 00:22:45 +03:00
}
assert.strictEqual(actual, expected);
};