fix persisted unit failure identity
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user