From 134d98905b85d0a615a8de3a82c4fa4994c79c83 Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Sun, 25 Oct 2026 15:35:18 -0700 Subject: [PATCH] Print: the Windows print test expects the driver's default color craft-print at a0916808 leaves the color feature out of the Windows PrintTicket unless the job asks for grayscale, so the color chosen in the driver's preferences applies, and its command preview ends with color=(driver default). print_builds_the_spool_command still expected color=color and failed on Windows. It now expects the new preview. print_submits_the_selected_export_and_reports_refusal also checks that the job does not ask for grayscale, so the job's color setting is checked on CUPS too. --- crates/engine/src/cmd/print.rs | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/crates/engine/src/cmd/print.rs b/crates/engine/src/cmd/print.rs index 8283dcf0a..a0fa22e94 100644 --- a/crates/engine/src/cmd/print.rs +++ b/crates/engine/src/cmd/print.rs @@ -86,7 +86,15 @@ mod tests { } else { assert_eq!( command, - ["xps-print", "printer=Office", "copies=2", "collate=true", "duplex=(queue default)", "scaling=shrink-to-fit", "color=color"] + [ + "xps-print", + "printer=Office", + "copies=2", + "collate=true", + "duplex=(queue default)", + "scaling=shrink-to-fit", + "color=(driver default)" + ] ); } assert!(r["bytes"].as_u64().unwrap() > 500); @@ -112,6 +120,7 @@ mod tests { assert_eq!(job.printer.as_deref(), Some("Office (east)")); assert_eq!(job.copies, 2); assert_eq!(job.duplex, None); + assert!(!job.grayscale); assert_eq!(job.scaling, craft_print::Scaling::ShrinkToFit); assert!(!job.title.is_empty()); Ok("request id is Office-1".into())