Fix 2444 regression test

This commit is contained in:
Daniel Imms
2020-09-10 07:52:02 -07:00
parent 9a22cbe44b
commit f669b8ed1d
@@ -111,9 +111,15 @@ describe('Search Tests', function(): void {
let fixture: string;
before(async () => {
const rawFixture = await new Promise<Buffer>(r => readFile(resolve(__dirname, '../fixtures/issue-2444'), (err, data) => r(data)));
fixture = rawFixture.toString()
.replace(/\n/g, '\\n')
.replace(/\r/g, '\\r')
if (process.platform === 'win32') {
fixture = rawFixture.toString()
.replace(/\n/g, '\\n')
.replace(/\r/g, '\\r');
} else {
fixture = rawFixture.toString()
.replace(/\n/g, '\\n\\r');
}
fixture = fixture
.replace(/'/g, '\\\'');
});
it('should find all occurrences using findNext', async () => {