mirror of
https://github.com/storytold/pdfcraft.git
synced 2026-12-02 20:20:35 -05:00
* 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]>
13 lines
648 B
Rust
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:?}");
|
|
}
|