From 677edd33d8a756dc4cf9244102e4efb61151f935 Mon Sep 17 00:00:00 2001 From: Guillaume Desmottes Date: Thu, 14 Mar 2024 10:12:12 +0100 Subject: [PATCH] test: fix 'optional' test on Ubuntu CI Pkg-config on this version has a trailing " in the cmd output. --- src/test.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/test.rs b/src/test.rs index 53b48d5..8181e2a 100644 --- a/src/test.rs +++ b/src/test.rs @@ -172,7 +172,9 @@ fn toml_pkg_config_err_version( output: _, name: _, } => { - let s = format!(">= {}\"", expected_version); + let s = format!(">= {}", expected_version); + // remove trailing '"", if any + let cmd = cmd.strip_suffix('"').unwrap_or(&cmd); assert!(cmd.ends_with(&s)); } _ => panic!("Wrong pkg-config error type"),