mirror of
https://github.com/oven-sh/bun
synced 2026-02-14 04:49:06 +00:00
16 lines
502 B
TypeScript
16 lines
502 B
TypeScript
import { expect, it } from "bun:test";
|
|
import { bunRunAsScript, tempDirWithFiles } from "harness";
|
|
|
|
it("should handle quote escapes", () => {
|
|
const package_json = JSON.stringify({
|
|
scripts: {
|
|
test: `echo "test\\\\$(pwd)"`,
|
|
},
|
|
});
|
|
expect(package_json).toContain('\\"');
|
|
expect(package_json).toContain("\\\\");
|
|
const dir = tempDirWithFiles("run-quote", { "package.json": package_json });
|
|
const { stdout } = bunRunAsScript(dir, "test");
|
|
expect(stdout).toBe(`test\\${dir}`);
|
|
});
|