Files
pdfcraft/crates/edit/tests/it/printer_marks_accented_label.rs
T
Elvis33LEandskylar taylor f785466336 test(ci): consolidate integration tests into tests/it across 6 crates (#9050)
* test(ci): consolidate integration tests into tests/it across 6 crates

* ci: update parity evidence paths for consolidated integration tests

---------

Co-authored-by: skylar taylor <[email protected]>
2026-12-02 15:17:52 -06:00

13 lines
648 B
Rust

//! The page information line keeps accented letters: WinAnsi bytes from 0x80 up must reach the
//! content stream as escapes, not be replaced with U+FFFD.
use pdfcraft_edit::PrinterMarks;
#[test]
fn accented_label_is_written_as_winansi_escapes() {
let marks = PrinterMarks { label: "Café.pdf".into(), ..PrinterMarks::default() };
let content = marks.content([0.0, 0.0, 612.0, 792.0], [0.0, 0.0, 612.0, 792.0], 1, 1);
assert!(!content.contains('\u{FFFD}'), "no replacement character in the stream: {content:?}");
assert!(content.contains("(Caf\\351.pdf 1 of 1)"), "é is the WinAnsi byte 0xE9 written as \\351: {content:?}");
}