aboutsummaryrefslogtreecommitdiff
path: root/test/js/node/string_decoder/string-decoder.test.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/js/node/string_decoder/string-decoder.test.js')
-rw-r--r--test/js/node/string_decoder/string-decoder.test.js9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/js/node/string_decoder/string-decoder.test.js b/test/js/node/string_decoder/string-decoder.test.js
index f37326678..aba73401a 100644
--- a/test/js/node/string_decoder/string-decoder.test.js
+++ b/test/js/node/string_decoder/string-decoder.test.js
@@ -241,3 +241,12 @@ for (const StringDecoder of [FakeStringDecoderCall, RealStringDecoder]) {
});
});
}
+
+it("invalid utf-8 input, pr #3562", () => {
+ const decoder = new RealStringDecoder("utf-8");
+ let output = "";
+ output += decoder.write(Buffer.from("B9", "hex"));
+ output += decoder.write(Buffer.from("A9", "hex"));
+ output += decoder.end();
+ expect(output).toStrictEqual("\uFFFD\uFFFD");
+});
//www.gravatar.com/avatar/9c0e69537b9d9493708725dd4c91e3af?s=13&d=retro' width='13' height='13' alt='Gravatar' /> Dylan Conway 4-11/+46 2023-08-10Fix memory leak in base64url (#4111)Gravatar Jarred Sumner 1-2/+2 2023-08-10Handle thundering herd of setInterval (#4109)Gravatar Jarred Sumner 1-2/+17 2023-08-10fs.zig: create temp files with 0o700, not 0o007 (#4107)Gravatar Adhityaa Chandrasekar 1-1/+1 2023-08-10Update remix guideGravatar Colin McDonnell 1-2/+4 2023-08-10zig fmtGravatar Jarred Sumner 1-4/+4 2023-08-10Fixes #4062 (#4106)Gravatar Jarred Sumner 8-26/+87 2023-08-10bun test: format description of test.each (#4092)Gravatar Jacques 3-13/+311 2023-08-10add util.formatWithOptions (#4090)Gravatar dave caruso 3-9/+30 2023-08-10Fix titleGravatar Colin McDonnell 1-1/+1