diff options
author | David Sherret <dsherret@users.noreply.github.com> | 2024-07-26 15:53:53 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-07-26 15:53:53 -0400 |
commit | 06b6352292b69359768c99a1fc984fa4bdcd07c9 (patch) | |
tree | 3b363e2ce167109e21bc9a68fe9e0d0e24bf0003 /tests | |
parent | ed2bf8ce310824d476c704483b59bb02720f7029 (diff) |
fix(unstable/compile): handle byonm import in sub dir (#24755)
Regression in 1.45.0 caused by storing relative paths instead of
absolute paths in the binary.
Closes #24654
Diffstat (limited to 'tests')
5 files changed, 45 insertions, 0 deletions
diff --git a/tests/specs/compile/byonm_main_sub_dir/__test__.jsonc b/tests/specs/compile/byonm_main_sub_dir/__test__.jsonc new file mode 100644 index 000000000..aa225ddd1 --- /dev/null +++ b/tests/specs/compile/byonm_main_sub_dir/__test__.jsonc @@ -0,0 +1,28 @@ +{ + "tempDir": true, + "envs": { + "DENO_FUTURE": "1" + }, + "steps": [{ + "args": "install", + "output": "[WILDCARD]" + }, { + "if": "unix", + "args": "compile --output main src/main.ts", + "output": "[WILDCARD]" + }, { + "if": "unix", + "commandName": "./main", + "args": [], + "output": "main.out" + }, { + "if": "windows", + "args": "compile --output main.exe src/main.ts", + "output": "[WILDCARD]" + }, { + "if": "windows", + "commandName": "./main.exe", + "args": [], + "output": "main.out" + }] +} diff --git a/tests/specs/compile/byonm_main_sub_dir/deno.json b/tests/specs/compile/byonm_main_sub_dir/deno.json new file mode 100644 index 000000000..6134d86d1 --- /dev/null +++ b/tests/specs/compile/byonm_main_sub_dir/deno.json @@ -0,0 +1,3 @@ +{ + "unstable": ["byonm"] +} diff --git a/tests/specs/compile/byonm_main_sub_dir/main.out b/tests/specs/compile/byonm_main_sub_dir/main.out new file mode 100644 index 000000000..00750edc0 --- /dev/null +++ b/tests/specs/compile/byonm_main_sub_dir/main.out @@ -0,0 +1 @@ +3 diff --git a/tests/specs/compile/byonm_main_sub_dir/package.json b/tests/specs/compile/byonm_main_sub_dir/package.json new file mode 100644 index 000000000..af0075a93 --- /dev/null +++ b/tests/specs/compile/byonm_main_sub_dir/package.json @@ -0,0 +1,11 @@ +{ + "name": "package", + "version": "1.0.0", + "description": "", + "keywords": [], + "author": "", + "license": "MIT", + "dependencies": { + "@denotest/add": "*" + } +} diff --git a/tests/specs/compile/byonm_main_sub_dir/src/main.ts b/tests/specs/compile/byonm_main_sub_dir/src/main.ts new file mode 100644 index 000000000..b75bbc03e --- /dev/null +++ b/tests/specs/compile/byonm_main_sub_dir/src/main.ts @@ -0,0 +1,2 @@ +import { add } from "@denotest/add"; +console.log(add(1, 2)); |