]> zoso.dev Git - buffer.git/commitdiff
add failing test for replacing the utf8 replacement char
authorJesse Tane <jesse.tane@gmail.com>
Sun, 16 Aug 2015 22:33:13 +0000 (18:33 -0400)
committerJesse Tane <jesse.tane@gmail.com>
Sun, 16 Aug 2015 22:33:13 +0000 (18:33 -0400)
test/to-string.js

index 8fd9db1fd3087537d3d3d965302dbfdfd2f58bbb..099229820dcec930907a6f00febff8a4a118c29f 100644 (file)
@@ -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()
+})