mirror of
https://github.com/oven-sh/bun
synced 2026-02-02 15:08:46 +00:00
bug(ENG-21501): Fix integer overflow in hosted_git_info.zig (#24561)
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
This commit is contained in:
30
test/cli/install/hosted-git-info/boundary-conditions.test.ts
Normal file
30
test/cli/install/hosted-git-info/boundary-conditions.test.ts
Normal file
@@ -0,0 +1,30 @@
|
||||
import { describe, expect, test } from "bun:test";
|
||||
import { bunEnv, bunExe, tempDir } from "harness";
|
||||
|
||||
describe("hosted-git-info boundary conditions", () => {
|
||||
test.each([{ description: "git with pound", dependency: "https://github.com/#" }])(
|
||||
"handle $description",
|
||||
async ({ description: _, dependency }) => {
|
||||
using dir = tempDir("hosted-git-info-empty", {
|
||||
"package.json": JSON.stringify({
|
||||
name: "test",
|
||||
dependencies: {
|
||||
dependency,
|
||||
},
|
||||
}),
|
||||
});
|
||||
|
||||
await using proc = Bun.spawn({
|
||||
cmd: [bunExe(), "install"],
|
||||
cwd: String(dir),
|
||||
env: bunEnv,
|
||||
stderr: "pipe",
|
||||
stdout: "pipe",
|
||||
});
|
||||
|
||||
const [stderr] = await Promise.all([proc.stderr.text(), proc.exited]);
|
||||
|
||||
expect(stderr).not.toContain("panic");
|
||||
},
|
||||
);
|
||||
});
|
||||
Reference in New Issue
Block a user