From c35f950586d1fba1e2b4844991ce4b62a341b077 Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Fri, 1 Dec 2023 01:16:16 +0100 Subject: [PATCH] version.rs test: make it work with a GDAL debug build --- src/version.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/version.rs b/src/version.rs index da59ea97..e9c8c11f 100644 --- a/src/version.rs +++ b/src/version.rs @@ -142,7 +142,9 @@ mod tests { date_iter.by_ref().take(2).collect::(), ); - assert_eq!(version_text, expected_text); + // Use starts_with() instead of equality check, because on a debug + // GDAL build, version_text will end with " (debug build)". + assert!(version_text.starts_with(&expected_text)); } #[test]