From: Jesse Tane Date: Sun, 16 Aug 2015 22:33:13 +0000 (-0400) Subject: add failing test for replacing the utf8 replacement char X-Git-Url: https://zoso.dev/?a=commitdiff_plain;h=1743d7d4bd869035e073fe48af27241668873f4f;p=buffer.git add failing test for replacing the utf8 replacement char --- diff --git a/test/to-string.js b/test/to-string.js index 8fd9db1..0992298 100644 --- a/test/to-string.js +++ b/test/to-string.js @@ -223,3 +223,11 @@ test('utf8 replacement chars for anything in the surrogate pair range', function ) t.end() }) + +test('utf8 don\'t replace the replacement char', function (t) { + t.equal( + new B('\uFFFD').toString(), + '\uFFFD' + ) + t.end() +})