File: test-expect-backtrace.patch

package info (click to toggle)
rust-failure 0.1.7-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, sid, trixie
  • size: 364 kB
  • sloc: sh: 37; makefile: 17
file content (13 lines) | stat: -rw-r--r-- 652 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
Description: Debian's tests run with RUST_BACKTRACE=1 which breaks this test;
 make it more lenient.
--- a/src/error/mod.rs
+++ b/src/error/mod.rs
@@ -225,7 +225,7 @@
         let error: Error = io::Error::new(io::ErrorKind::NotFound, "test").into();
         assert!(error.downcast_ref::<io::Error>().is_some());
         let _: ::Backtrace = *error.backtrace();
-        assert_eq!(format!("{:?}", io_error), format!("{:?}", error));
+        assert_eq!(Some(format!("{:?}", io_error).as_str()), format!("{:?}", error).lines().next());
         assert_eq!(format!("{}", io_error), format!("{}", error));
         drop(error);
         assert!(true);