mirror of
https://github.com/oven-sh/bun
synced 2026-02-02 15:08:46 +00:00
11 lines
470 B
TypeScript
11 lines
470 B
TypeScript
import { escapePowershell } from "bun:internal-for-testing";
|
|
|
|
it("powershell escaping rules", () => {
|
|
// This formatter does not include quotes around the string intentionally
|
|
expect(escapePowershell("foo")).toBe("foo");
|
|
expect(escapePowershell("foo bar")).toBe("foo bar");
|
|
expect(escapePowershell('foo" bar')).toBe('foo`" bar');
|
|
expect(escapePowershell('foo" `bar')).toBe('foo`" ``bar');
|
|
expect(escapePowershell('foo" ``"bar')).toBe('foo`" `````"bar');
|
|
});
|