Skip to content

Commit e9716d1

Browse files
authoredJul 16, 2021
Account for CRLF in a test
1 parent 0f3e241 commit e9716d1

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.