X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;ds=sidebyside;f=library%2Ftest%2Fsrc%2Fformatters%2Fterse.rs;h=5dace8baef7f823054d29b93305922b4b8b2c667;hb=b72a7fbcdc6978f73f6e16d0c0cfad8551dc6afe;hp=fb40f86b42e19ebfdcec4c15e288c171be262f9f;hpb=6a9080b25e73d26aae94c3f6a13b31de58e66b5a;p=rust.git diff --git a/library/test/src/formatters/terse.rs b/library/test/src/formatters/terse.rs index fb40f86b42e..5dace8baef7 100644 --- a/library/test/src/formatters/terse.rs +++ b/library/test/src/formatters/terse.rs @@ -11,8 +11,9 @@ types::TestDesc, }; -// insert a '\n' after 100 tests in quiet mode -const QUIET_MODE_MAX_COLUMN: usize = 100; +// We insert a '\n' when the output hits 100 columns in quiet mode. 88 test +// result chars leaves 12 chars for a progress count like " 11704/12853". +const QUIET_MODE_MAX_COLUMN: usize = 88; pub(crate) struct TerseFormatter { out: OutputLocation, @@ -65,7 +66,7 @@ pub fn write_short_result( ) -> io::Result<()> { self.write_pretty(result, color)?; if self.test_count % QUIET_MODE_MAX_COLUMN == QUIET_MODE_MAX_COLUMN - 1 { - // we insert a new line every 100 dots in order to flush the + // We insert a new line regularly in order to flush the // screen when dealing with line-buffered output (e.g., piping to // `stamp` in the rust CI). let out = format!(" {}/{}\n", self.test_count + 1, self.total_test_count);