From 9275cfc93869c47bfa5c99776f18e68a00789bd5 Mon Sep 17 00:00:00 2001 From: Daniel Schadt Date: Wed, 20 Apr 2022 20:45:09 +0200 Subject: fix mai trin success detection for early failures --- tests/analyzers.rs | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'tests/analyzers.rs') diff --git a/tests/analyzers.rs b/tests/analyzers.rs index dc876d6..9779e27 100644 --- a/tests/analyzers.rs +++ b/tests/analyzers.rs @@ -63,7 +63,21 @@ fn test_mai_cm_succeeded() { #[test] fn test_mai_cm_failed() { - let log = evtclib::process_file("tests/logs/cms/mai-trin-failed.zevtc", Compression::Zip).unwrap(); + let log = + evtclib::process_file("tests/logs/cms/mai-trin-failed.zevtc", Compression::Zip).unwrap(); + + let analyzer = log.analyzer().expect("No analyzer for Mai Trin"); + + assert_eq!(analyzer.outcome(), Some(Outcome::Failure)); +} + +#[test] +fn test_mai_failed_pre_echo() { + let log = evtclib::process_file( + "tests/logs/analyzers/mai-failed-pre-echo-20220420.zevtc", + Compression::Zip, + ) + .unwrap(); let analyzer = log.analyzer().expect("No analyzer for Mai Trin"); -- cgit v1.2.3