remove test-specific logic from test-snapshot
@@ -41,15 +41,6 @@ pub fn run_capturing_stdout(cmd: &mut Command) -> anyhow::Result<String> {
match output.status.success() {
true => Ok(str::from_utf8(&output.stdout)?.to_string()),
false => {
- // #[should_error]-tests return non-zero code
- if output.status.code() == Some(1) {
- let stdout = str::from_utf8(&output.stdout)?;
- if stdout.contains(
- "`#[should_error]` test failed with outcome: Ok(this should have returned `Err`)",
- ) {
- return Ok(stdout.to_string());
- }
- }
eprintln!("{}", str::from_utf8(&output.stderr)?.dimmed());
Err(anyhow!(""))
}
