Skip to content

Commit 8967a66

Browse files
committed
std: Use the singular 'test' when running just 1. Closes #2554
1 parent 49d6d1b commit 8967a66

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/libstd/test.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,8 @@ fn run_tests_console(opts: test_opts,
107107
alt event {
108108
te_filtered(filtered_tests) {
109109
st.total = vec::len(filtered_tests);
110-
st.out.write_line(#fmt["\nrunning %u tests", st.total]);
110+
let noun = if st.total != 1u { "tests" } else { "test" };
111+
st.out.write_line(#fmt["\nrunning %u %s", st.total, noun]);
111112
}
112113
te_wait(test) { st.out.write_str(#fmt["test %s ... ", test.name]); }
113114
te_result(test, result) {

0 commit comments

Comments
 (0)