feat(cph): add outline export command

This commit is contained in:
2026-08-05 16:34:02 +08:00
committed by 洪佳荣
parent 9927d38c18
commit fe8a17c6ad
15 changed files with 635 additions and 56 deletions
+12
View File
@@ -134,6 +134,18 @@ fn augmented_manifest_has_outline_with_section_and_fields() {
assert_eq!(fields_of(4), vec!["problem", "solution"]);
}
#[test]
fn outline_pdf_renders_without_lesson_files() {
let lesson = load_mini();
let outline = lesson.outline_document();
let engine = Engine::with_render_dir(real_render_dir());
let pdf = engine
.build_outline_pdf(&outline)
.expect("outline PDF should compile");
assert!(pdf.starts_with(b"%PDF"), "output should be a PDF");
assert!(pdf.len() > 1_000, "outline PDF should be non-trivial");
}
/// THROUGH-TEMPLATE compile-check against the REAL render package: compiling the
/// student template as main with the injected augmented manifest is clean (zero
/// Error-severity diagnostics). This proves the template → manifest → include