diff options
author | Dan Davison <dandavison7@gmail.com> | 2021-12-14 00:19:59 -0500 |
---|---|---|
committer | Dan Davison <dandavison7@gmail.com> | 2021-12-14 01:39:48 -0500 |
commit | 2dad3e8060e98889459c756039e1110bcd247af9 (patch) | |
tree | 2c378a8e971ebde326aad4f5715fe98d93edfbc3 | |
parent | f650f485edb0581406175a8903c3f0ea7a5425f2 (diff) |
Add inspect_raw method to DeltaTest
-rw-r--r-- | src/tests/integration_test_utils.rs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/tests/integration_test_utils.rs b/src/tests/integration_test_utils.rs index ba5c874c..7735a96b 100644 --- a/src/tests/integration_test_utils.rs +++ b/src/tests/integration_test_utils.rs @@ -171,6 +171,9 @@ pub struct DeltaTestOutput { } impl DeltaTestOutput { + /// Print output, either without ANSI escape sequences or, if explain_ansi() has been called, + /// with ASCII explanation of ANSI escape sequences. + #[allow(unused)] pub fn inspect(self) -> Self { eprintln!("{}", "▼".repeat(100)); eprintln!("{}", self.format_output()); @@ -178,6 +181,15 @@ impl DeltaTestOutput { self } + /// Print raw output, with any ANSI escape sequences. + #[allow(unused)] + pub fn inspect_raw(self) -> Self { + eprintln!("{}", "▼".repeat(100)); + eprintln!("{}", self.output); + eprintln!("{}", "▲".repeat(100)); + self + } + pub fn explain_ansi(mut self) -> Self { self.explain_ansi_ = true; self |