Files
bun.sh/test/regression/issue/09041.test.ts
Jarred Sumner b3cfaab07f Fix: after pausing stdin, a subprocess should be able to read from stdin (#23341)
Fixes #23333, Fixes #13978

### What does this PR do?

### How did you verify your code works?

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Claude Bot <claude-bot@bun.sh>
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: pfg <pfg@pfg.pw>
Co-authored-by: Zack Radisic <zack@theradisic.com>
2025-10-09 19:04:41 -07:00

29 lines
682 B
TypeScript

import { expect, test } from "bun:test";
import { bunEnv, bunExe } from "harness";
test("09041", async () => {
let { exited, stderr, stdout } = Bun.spawn({
cmd: [bunExe(), "test", import.meta.dirname + "/09041/09041-fixture.ts"],
env: bunEnv,
stdio: ["ignore", "pipe", "pipe"],
});
const stderrText = await stderr.text();
const stdoutText = await stdout.text();
const exitCode = await exited;
console.log(`
====== stderr ======
${stderrText}
====== stdout ======
${stdoutText}
====== exit code ======
${exitCode}
`);
expect(exitCode).toBe(0);
const err = stderrText;
expect(err).toContain("1 pass");
expect(err).toContain("0 fail");
}, 30000);