From 1959b18f82d4e3cbd9b55f7c9d76f63c8778002a Mon Sep 17 00:00:00 2001 From: GloamXun Date: Wed, 28 Oct 2026 09:20:33 +0800 Subject: [PATCH] Assert ORCID badges in the SVG preview The arXiv preview must contain exactly two PNG data URIs for the author badges and no iD text marker. This covers the SVG half of the ORCID post-processing; the PDF half is covered by the display-list unit test. Test count stays 1084. --- src/route_d.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/route_d.rs b/src/route_d.rs index 11ca3f0..5049f0a 100755 --- a/src/route_d.rs +++ b/src/route_d.rs @@ -20090,6 +20090,12 @@ left & right \\ let pages = value["pages"].as_array().expect("pages"); let first = pages[0]["svg"].as_str().expect("first svg"); let second = pages[1]["svg"].as_str().expect("second svg"); + assert_eq!( + first.matches("data:image/png;base64").count(), + 2, + "expected two ORCID badges" + ); + assert!(!first.contains("iD David"), "ORCID text marker remains"); assert!( !first.contains("arXiv Template"), "title page must not show the running header"