chore: record final sgclaw superrpa runtime verification

This commit is contained in:
zyl
2026-03-30 00:06:33 +08:00
parent 0fc6fe0c8e
commit c7d3d45c68
3 changed files with 94 additions and 43 deletions

View File

@@ -89,3 +89,41 @@ async fn openxml_office_tool_accepts_reordered_columns_when_rows_are_structured(
assert!(xml.contains("344万"));
assert!(xml.contains(">1<"));
}
#[tokio::test]
async fn openxml_office_tool_accepts_localized_hotlist_column_aliases() {
let workspace_root = temp_workspace_root();
let output_path = workspace_root.join("out/zhihu-hotlist-localized.xlsx");
let tool = OpenXmlOfficeTool::new(workspace_root.clone());
let result = tool
.execute(json!({
"sheet_name": "知乎热榜",
"columns": ["排名", "标题", "热度"],
"rows": [
[1, "问题一", "344万"],
[2, "问题二", "266万"]
],
"output_path": output_path
}))
.await
.unwrap();
assert!(result.success, "{result:?}");
assert!(output_path.exists());
let unzip = ProcessCommand::new("unzip")
.args([
"-p",
output_path.to_str().unwrap(),
"xl/worksheets/sheet1.xml",
])
.output()
.unwrap();
assert!(unzip.status.success());
let xml = String::from_utf8(unzip.stdout).unwrap();
assert!(xml.contains("问题一"));
assert!(xml.contains("344万"));
assert!(xml.contains(">1<"));
}