File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ pub(crate) struct TerseFormatter<T> {
1818 max_name_len : usize ,
1919
2020 test_count : usize ,
21+ total_test_count : usize ,
2122}
2223
2324impl < T : Write > TerseFormatter < T > {
@@ -33,6 +34,7 @@ impl<T: Write> TerseFormatter<T> {
3334 max_name_len,
3435 is_multithreaded,
3536 test_count : 0 ,
37+ total_test_count : 0 ,
3638 }
3739 }
3840
@@ -66,7 +68,8 @@ impl<T: Write> TerseFormatter<T> {
6668 // we insert a new line every 100 dots in order to flush the
6769 // screen when dealing with line-buffered output (e.g. piping to
6870 // `stamp` in the rust CI).
69- self . write_plain ( "\n " ) ?;
71+ let out = format ! ( " {}/{}\n " , self . test_count+1 , self . total_test_count) ;
72+ self . write_plain ( & out) ?;
7073 }
7174
7275 self . test_count += 1 ;
@@ -160,6 +163,7 @@ impl<T: Write> TerseFormatter<T> {
160163
161164impl < T : Write > OutputFormatter for TerseFormatter < T > {
162165 fn write_run_start ( & mut self , test_count : usize ) -> io:: Result < ( ) > {
166+ self . total_test_count = test_count;
163167 let noun = if test_count != 1 { "tests" } else { "test" } ;
164168 self . write_plain ( & format ! ( "\n running {} {}\n " , test_count, noun) )
165169 }
You can’t perform that action at this time.
0 commit comments