fix persisted unit failure identity

This commit is contained in:
udo
2026-07-14 21:44:31 +00:00
parent d33d5e80ba
commit 8c3f8c5e01
3 changed files with 16 additions and 2 deletions
+3 -1
View File
@@ -17,6 +17,7 @@ RENDER(Request& context)
auto unit_paths = units_list();
DValue info = unit_info("call_helpers.uce");
DValue relative_info = unit_info("components/../relative-child.uce");
ob_start();
unit_call("call_helpers.uce", "emit_marker");
@@ -30,10 +31,11 @@ RENDER(Request& context)
check("units_list()", unit_paths.size() > 0, "count=" + std::to_string(unit_paths.size()));
check("unit_info()", info["path"].to_string() != "", json_encode(info));
check("compiler canonicalizes relative unit paths", relative_info["path"].to_string().find("/../") == String::npos && str_ends_with(relative_info["path"].to_string(), "/site/tests/relative-child.uce"), json_encode(relative_info));
check("unit_compile()", unit_compile("call_helpers.uce"), "call_helpers.uce");
check("unit_call()", call_output.find("UNIT_CALL_EXPORT_OK") != String::npos, call_output);
check("unit_render()", render_output.find("data-unit-render=\"ok\"") != String::npos, render_output);
site_tests_summary(passed, failed, skipped, "The local fixture call_helpers.uce keeps these checks deterministic and self-contained within site/tests.");
site_tests_page_end();
}
}