diff --git a/tests/builder/multiple_values.rs b/tests/builder/multiple_values.rs index 4f14ea0f..ba04d296 100644 --- a/tests/builder/multiple_values.rs +++ b/tests/builder/multiple_values.rs @@ -176,7 +176,17 @@ fn option_exact_less() { .try_get_matches_from(vec!["", "-o", "val1", "-o", "val2"]); assert!(m.is_err()); - assert_eq!(m.unwrap_err().kind(), ErrorKind::WrongNumberOfValues); + let err = m.unwrap_err(); + assert_eq!(err.kind(), ErrorKind::WrongNumberOfValues); + #[cfg(feature = "error-context")] + assert_data_eq!(err.to_string(), str![[r#" +error: 3 values required for '-o