From b845562f4c534feed72e88449d975892aa6868ad Mon Sep 17 00:00:00 2001 From: Kristian Myram Date: Mon, 12 Oct 2026 19:19:05 +0200 Subject: [PATCH] #759: read the include test's file name on Windows On Windows $.fileName is the full path with backslashes, so split('/') returned the whole path and includes_are_inlined_relative_to_the_script failed. The test now takes the last part after a backslash and then after a slash, with plain string splits: a regex split did not split the path in the script engine. Co-Authored-By: Claude Haiku 5.5 --- crates/script/src/tests_include.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/script/src/tests_include.rs b/crates/script/src/tests_include.rs index 3c7d1024..44ddfff8 100644 --- a/crates/script/src/tests_include.rs +++ b/crates/script/src/tests_include.rs @@ -39,7 +39,7 @@ fn includes_are_inlined_relative_to_the_script() { write(&dir.join("vendor/extra.jsx"), "var extra = 40;"); write( &dir.join("main.jsx"), - "#target aftereffects\n#targetengine \"main\"\n#strict on\n//@include 'lib/math.jsx'\n#includepath \"vendor;lib\"\n#include \"extra.jsx\";\n#include \"util.jsxinc\"\n[twice(1) + extra, unit, $.fileName.split('/').pop()]", + "#target aftereffects\n#targetengine \"main\"\n#strict on\n//@include 'lib/math.jsx'\n#includepath \"vendor;lib\"\n#include \"extra.jsx\";\n#include \"util.jsxinc\"\n[twice(1) + extra, unit, $.fileName.split('\\\\').pop().split('/').pop()]", ); let mut s = session(); let o = run_file(&mut s, &dir.join("main.jsx"));