Files
bun.sh/test/cli/run/run-unicode.test.ts
dave caruso 98d19fa624 fix(runtime): make some things more stable (partial jsc debug build) (#5881)
* make our debug assertions work

* install bun-webkit-debug

* more progress

* ok

* progress...

* more debug build stuff

* ok

* a

* asdfghjkl

* fix(runtime): fix bad assertion failure in JSBufferList

* ok

* stuff

* upgrade webkit

* Update src/bun.js/bindings/JSDOMWrapperCache.h

Co-authored-by: Jarred Sumner <jarred@jarredsumner.com>

* fix message for colin's changes

* okay

* fix cjs prototype

* implement mainModule

* i think this fixes it all

---------

Co-authored-by: Jarred Sumner <jarred@jarredsumner.com>
2023-10-16 21:22:43 -07:00

22 lines
771 B
TypeScript
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import { expect, test } from "bun:test";
import { mkdirSync, realpathSync } from "fs";
import { bunEnv, bunExe } from "harness";
import { tmpdir } from "os";
import { join } from "path";
test("running a weird filename works", async () => {
const troll = "💥'\"\n";
const dir = join(realpathSync(tmpdir()), "bun-run-test" + troll);
mkdirSync(dir, { recursive: true });
console.log("dir", dir);
// i this it's possible that the filesystem rejects the path
await Bun.write(join(dir, troll + ".js"), "console.log('hello world');");
let { stdout } = Bun.spawnSync({
cmd: [bunExe(), join(dir, troll + ".js")],
cwd: dir,
env: bunEnv,
stdio: ["ignore", "pipe", "inherit"],
});
expect(stdout.toString("utf8")).toEqual("hello world\n");
});