aboutsummaryrefslogtreecommitdiff
path: root/test/js/node/path/path.test.js
diff options
context:
space:
mode:
authorGravatar David Hewitt <davidmhewitt@users.noreply.github.com> 2023-09-12 13:05:00 +0100
committerGravatar GitHub <noreply@github.com> 2023-09-12 05:05:00 -0700
commit07a6443a80d57c2aaa958bafba091bf4f9e88ca8 (patch)
tree004bc2718ca10f003eb31dc091b55528d1b98760 /test/js/node/path/path.test.js
parent6e4f746ace3a42c1a5c9431beba2ae599a6f15b0 (diff)
downloadbun-07a6443a80d57c2aaa958bafba091bf4f9e88ca8.tar.gz
bun-07a6443a80d57c2aaa958bafba091bf4f9e88ca8.tar.zst
bun-07a6443a80d57c2aaa958bafba091bf4f9e88ca8.zip
fix(node/path): Prevent memory corruption in parse (#5083)
* Add failing test for issue #4954 * fix(node/path): Return results with toValueGC
Diffstat (limited to 'test/js/node/path/path.test.js')
-rw-r--r--test/js/node/path/path.test.js11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/js/node/path/path.test.js b/test/js/node/path/path.test.js
index 5865d6182..f18e5c72d 100644
--- a/test/js/node/path/path.test.js
+++ b/test/js/node/path/path.test.js
@@ -812,6 +812,17 @@ describe("path.parse and path.format", () => {
name: "another_dir",
},
},
+ {
+ // https://github.com/oven-sh/bun/issues/4954
+ input: "/test/Ł.txt",
+ expected: {
+ root: "/",
+ dir: "/test",
+ base: "Ł.txt",
+ ext: ".txt",
+ name: "Ł",
+ },
+ }
];
testCases.forEach(({ input, expected }) => {
it(`case ${input}`, () => {