Permalink
Browse files

Improve test, fix dumbness

  • Loading branch information...
forivall committed Aug 14, 2015
1 parent 55e4f68 commit 584feb465f989eda20242fdc8a74efa1f709b99f
Showing with 3 additions and 3 deletions.
  1. +1 −1 index.js
  2. +2 −2 test/unicode_separators.js
View
@@ -66,7 +66,7 @@ module.exports = function () {
}
else if (c === multiByteSeparatorCode) {
var rawBuf = buf.slice(i, i + multiByteSeparatorLength);
var escapeBuf;
var escapeBuf = null;
if (rawBuf.equals(multiByteBuffers.lineSeparator)) {
escapeBuf = buffers.escapeLineSeparator;
} else if (rawBuf.equals(multiByteBuffers.paragraphSeparator)) {
@@ -5,10 +5,10 @@ var test = require('tape');
test('js string unicode separators', function (t) {
t.plan(1);
var q = quote();
q.end('beep\u2028ima\u2029jeep');
q.end('\u2027beep\u2028ima\u2029jeep\u2030');
q.pipe(concat(function (body) {
t.equal(body.toString('utf8'), '"beep\\u2028ima\\u2029jeep"');
t.equal(body.toString('utf8'), '"\u2027beep\\u2028ima\\u2029jeep\u2030"');
}));
});

0 comments on commit 584feb4

Please sign in to comment.