fix: ensure includes are pulled in relative to their parent

This commit is contained in:
Andy Burke 2025-06-30 15:33:13 -07:00
parent 0f65e57539
commit 02c10aaa72
8 changed files with 9 additions and 8 deletions

View file

@ -17,7 +17,7 @@ Deno.test({
Deno.chdir('./tests/www');
test_server_info = await get_ephemeral_listen_server();
const response = await fetch(`http://${test_server_info.hostname}:${test_server_info.port}/`, {
const response = await fetch(`http://${test_server_info.hostname}:${test_server_info.port}/includes/index.html`, {
method: 'GET'
});
@ -36,7 +36,7 @@ Deno.test({
});
Deno.test({
name: 'get html file (text/plain)',
name: 'get html file (text/plain) (also test automatic index.html)',
permissions: {
env: true,
read: true,
@ -51,7 +51,7 @@ Deno.test({
Deno.chdir('./tests/www');
test_server_info = await get_ephemeral_listen_server();
const response = await fetch(`http://${test_server_info.hostname}:${test_server_info.port}/index.html`, {
const response = await fetch(`http://${test_server_info.hostname}:${test_server_info.port}/includes`, {
method: 'GET',
headers: {
'Accept': 'text/plain'

View file

@ -0,0 +1,3 @@
<div>Include #1</div>
<!-- #include file="./subdir/another_include.html" -->

View file

@ -1,3 +0,0 @@
<div>Include #1</div>
<!-- #include file="./another_include.html" -->