修正发行资源归一化测试
Project CI / Backend tests (pull_request) Failing after 23s
Project CI / AI game creator shell Rust lane 1/2 (pull_request) Successful in 5m56s
Project CI / AI game creator shell Rust lane 2/2 (pull_request) Failing after 3m44s
Project CI / AI game creator shell Rust crates (pull_request) Successful in 1m41s
Project CI / Repository checks (pull_request) Failing after 29s
Project CI / Frontend tests (pull_request) Failing after 1m38s
Project CI / AI game creator shell web tests (pull_request) Successful in 2m46s
Project CI / Native shell tests (pull_request) Successful in 6m5s

使用真实 HTML 资源引用验证根绝对路径归一化,修复 CI 中的转义输入误报。
This commit is contained in:
2026-10-03 15:04:45 +08:00
parent 667d1ad6dc
commit b1e04e8a7b
@@ -619,7 +619,7 @@ mod tests {
#[test]
fn normalize_release_asset_references_removes_root_prefix_only_in_text() {
let source = br#"<img src=\"/assets/hero.png\"><script>fetch('/ui/config.json')</script><style>url(/game/icon.svg)</style>"#;
let source = br#"<img src="/assets/hero.png"><script>fetch('/ui/config.json')</script><style>url(/game/icon.svg)</style>"#;
let normalized = normalize_release_asset_references("index.html", source.to_vec());
let normalized = String::from_utf8(normalized).expect("normalized text");
assert!(normalized.contains("src=\"assets/hero.png\""));