aboutsummaryrefslogtreecommitdiff
path: root/crates/expect/src/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/expect/src/lib.rs')
-rw-r--r--crates/expect/src/lib.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/crates/expect/src/lib.rs b/crates/expect/src/lib.rs
index c54e99203..21a458d47 100644
--- a/crates/expect/src/lib.rs
+++ b/crates/expect/src/lib.rs
@@ -121,6 +121,10 @@ impl ExpectFile {
121 } 121 }
122 Runtime::fail_file(self, &expected, actual); 122 Runtime::fail_file(self, &expected, actual);
123 } 123 }
124 pub fn assert_debug_eq(&self, actual: &impl fmt::Debug) {
125 let actual = format!("{:#?}\n", actual);
126 self.assert_eq(&actual)
127 }
124 fn read(&self) -> String { 128 fn read(&self) -> String {
125 fs::read_to_string(self.abs_path()).unwrap_or_default().replace("\r\n", "\n") 129 fs::read_to_string(self.abs_path()).unwrap_or_default().replace("\r\n", "\n")
126 } 130 }