Skip to content

Commit fab3248

Browse files
authoredJul 16, 2021
Merge pull request #704 from zbynek/patch-1
Account for CRLF in a test
2 parents 0f3e241 + e9716d1 commit fab3248

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed
 

‎test/range.test.js

+5-1
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,11 @@ test('partial range', (t) => {
101101
t.equal(res.statusCode, 206, 'partial content status code');
102102
t.equal(eol.lf(body), 'e!!</b>\n');
103103
t.equal(parseInt(res.headers['content-length'], 10), body.length);
104-
t.equal(res.headers['content-range'], 'bytes 3-10/11');
104+
if (eol.lf(body) != body) { // on Windows, depending on Git settings
105+
t.equal(res.headers['content-range'], 'bytes 3-11/12');
106+
} else {
107+
t.equal(res.headers['content-range'], 'bytes 3-10/11');
108+
}
105109
});
106110
});
107111
});

0 commit comments

Comments
 (0)
Please sign in to comment.