2024-09-10 04:21:22 +03:00
|
|
|
'use strict';
|
2019-02-19 00:22:45 +03:00
|
|
|
|
2024-09-10 04:21:22 +03:00
|
|
|
const assert = require('assert');
|
|
|
|
const os = require('os');
|
2019-02-19 00:22:45 +03:00
|
|
|
|
2024-09-10 04:21:22 +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') {
|
2024-09-10 04:21:22 +03:00
|
|
|
expected = expected.replace(/\//g, '\\').replace(/\r\n/g, '\n');
|
2019-02-19 00:22:45 +03:00
|
|
|
}
|
2024-09-10 04:21:22 +03:00
|
|
|
assert.strictEqual(actual, expected);
|
|
|
|
};
|