File tree 1 file changed +5
-1
lines changed
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> {
18
18
max_name_len : usize ,
19
19
20
20
test_count : usize ,
21
+ total_test_count : usize ,
21
22
}
22
23
23
24
impl < T : Write > TerseFormatter < T > {
@@ -33,6 +34,7 @@ impl<T: Write> TerseFormatter<T> {
33
34
max_name_len,
34
35
is_multithreaded,
35
36
test_count : 0 ,
37
+ total_test_count : 0 ,
36
38
}
37
39
}
38
40
@@ -66,7 +68,8 @@ impl<T: Write> TerseFormatter<T> {
66
68
// we insert a new line every 100 dots in order to flush the
67
69
// screen when dealing with line-buffered output (e.g. piping to
68
70
// `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) ?;
70
73
}
71
74
72
75
self . test_count += 1 ;
@@ -160,6 +163,7 @@ impl<T: Write> TerseFormatter<T> {
160
163
161
164
impl < T : Write > OutputFormatter for TerseFormatter < T > {
162
165
fn write_run_start ( & mut self , test_count : usize ) -> io:: Result < ( ) > {
166
+ self . total_test_count = test_count;
163
167
let noun = if test_count != 1 { "tests" } else { "test" } ;
164
168
self . write_plain ( & format ! ( "\n running {} {}\n " , test_count, noun) )
165
169
}
You can’t perform that action at this time.
0 commit comments