File: fix-tests.diff

package info (click to toggle)
rust-tracing-subscriber 0.3.16-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 1,872 kB
  • sloc: makefile: 2
file content (35 lines) | stat: -rw-r--r-- 1,237 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
Index: tracing-subscriber/src/fmt/format/mod.rs
===================================================================
--- tracing-subscriber.orig/src/fmt/format/mod.rs
+++ tracing-subscriber/src/fmt/format/mod.rs
@@ -1818,7 +1818,7 @@ pub(super) mod test {
         let _default = set_default(&subscriber.into());
         tracing::info!("hello");
         let res = make_writer.get_string();
-        assert!(expected.is_match(&res));
+        assert!(expected.is_match(&res),"string {:?} did not match pattern {:?}",res,expected);
     }
 
     #[test]
@@ -2149,8 +2149,7 @@ pub(super) mod test {
 
     /// Returns the test's module path.
     fn current_path() -> String {
-        Path::new("tracing-subscriber")
-            .join("src")
+        Path::new("src")
             .join("fmt")
             .join("format")
             .join("mod.rs")
--- tracing-subscriber.orig/src/fmt/format/json.rs
+++ tracing-subscriber/src/fmt/format/json.rs
@@ -578,8 +578,7 @@ mod test {
 
     #[test]
     fn json_filename() {
-        let current_path = Path::new("tracing-subscriber")
-            .join("src")
+        let current_path = Path::new("src")
             .join("fmt")
             .join("format")
             .join("json.rs")