File tree Expand file tree Collapse file tree
crates/libtest2-harness/src/notify Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -52,7 +52,8 @@ impl<W: std::io::Write> super::Notifier for PrettyRunNotifier<W> {
5252 }
5353 }
5454 Event :: CaseComplete ( inner) => {
55- let ( s, style) = match inner. status {
55+ let status = self . summary . get_status ( & inner. name ) ;
56+ let ( s, style) = match status {
5657 Some ( RunStatus :: Ignored ) => ( "ignored" , IGNORED ) ,
5758 Some ( RunStatus :: Failed ) => ( "FAILED" , FAILED ) ,
5859 None => ( "ok" , OK ) ,
Original file line number Diff line number Diff line change @@ -16,6 +16,11 @@ pub(crate) struct Summary {
1616}
1717
1818impl Summary {
19+ pub ( crate ) fn get_status ( & self , name : & str ) -> Option < RunStatus > {
20+ let event = self . status . get ( name) ?;
21+ event. status
22+ }
23+
1924 pub ( crate ) fn write_start ( & self , writer : & mut dyn std:: io:: Write ) -> std:: io:: Result < ( ) > {
2025 let s = if self . num_run == 1 { "" } else { "s" } ;
2126
Original file line number Diff line number Diff line change @@ -69,7 +69,8 @@ impl<W: std::io::Write> super::Notifier for TerseRunNotifier<W> {
6969 }
7070 Event :: CaseStart ( _) => { }
7171 Event :: CaseComplete ( inner) => {
72- let ( c, style) = match inner. status {
72+ let status = self . summary . get_status ( & inner. name ) ;
73+ let ( c, style) = match status {
7374 Some ( RunStatus :: Ignored ) => ( 'i' , IGNORED ) ,
7475 Some ( RunStatus :: Failed ) => ( 'F' , FAILED ) ,
7576 None => ( '.' , OK ) ,
You can’t perform that action at this time.
0 commit comments