@@ -2609,18 +2609,19 @@ impl<'test> TestCx<'test> {
2609
2609
( expected, actual)
2610
2610
} ;
2611
2611
2612
- // Write the actual output to a file in build/
2613
- let test_name = self . config . compare_mode . as_ref ( ) . map_or ( "" , |m| m. to_str ( ) ) ;
2612
+ // Write the actual output to a file in build directory.
2614
2613
let actual_path = self
2615
2614
. output_base_name ( )
2616
2615
. with_extra_extension ( self . revision . unwrap_or ( "" ) )
2617
- . with_extra_extension ( test_name)
2616
+ . with_extra_extension (
2617
+ self . config . compare_mode . as_ref ( ) . map ( |cm| cm. to_str ( ) ) . unwrap_or ( "" ) ,
2618
+ )
2618
2619
. with_extra_extension ( stream) ;
2619
2620
2620
2621
if let Err ( err) = fs:: write ( & actual_path, & actual) {
2621
- self . fatal ( & format ! ( "failed to write {stream} to `{actual_path:? }`: {err}" , ) ) ;
2622
+ self . fatal ( & format ! ( "failed to write {stream} to `{actual_path}`: {err}" , ) ) ;
2622
2623
}
2623
- println ! ( "Saved the actual {stream} to {actual_path:?} " ) ;
2624
+ println ! ( "Saved the actual {stream} to ` {actual_path}` " ) ;
2624
2625
2625
2626
if !self . config . bless {
2626
2627
if expected. is_empty ( ) {
@@ -2646,13 +2647,16 @@ impl<'test> TestCx<'test> {
2646
2647
2647
2648
if !actual. is_empty ( ) {
2648
2649
if let Err ( err) = fs:: write ( & expected_path, & actual) {
2649
- self . fatal ( & format ! ( "failed to write {stream} to `{expected_path:? }`: {err}" ) ) ;
2650
+ self . fatal ( & format ! ( "failed to write {stream} to `{expected_path}`: {err}" ) ) ;
2650
2651
}
2651
- println ! ( "Blessing the {stream} of {test_name} in {expected_path:?}" ) ;
2652
+ println ! (
2653
+ "Blessing the {stream} of `{test_name}` as `{expected_path}`" ,
2654
+ test_name = self . testpaths. file
2655
+ ) ;
2652
2656
}
2653
2657
}
2654
2658
2655
- println ! ( "\n The actual {0 } differed from the expected {0}." , stream ) ;
2659
+ println ! ( "\n The actual {stream } differed from the expected {stream}" ) ;
2656
2660
2657
2661
if self . config . bless { CompareOutcome :: Blessed } else { CompareOutcome :: Differed }
2658
2662
}
0 commit comments