From: Jean Privat Date: Thu, 2 Jun 2016 21:31:08 +0000 (-0400) Subject: nitunit: remove `more_message` from status as it causes terminal overflow X-Git-Url: http://nitlanguage.org nitunit: remove `more_message` from status as it causes terminal overflow Signed-off-by: Jean Privat --- diff --git a/src/testing/testing_base.nit b/src/testing/testing_base.nit index c24fc71..cb5db15 100644 --- a/src/testing/testing_base.nit +++ b/src/testing/testing_base.nit @@ -101,7 +101,7 @@ ulimit -t {{{ulimit_usertime}}} 2> /dev/null # So it is expected that: # * no other output is printed between two calls # * the last `show_unit_status` is followed by a new-line - fun show_unit_status(name: String, tests: SequenceRead[UnitTest], more_message: nullable String) + fun show_unit_status(name: String, tests: SequenceRead[UnitTest]) do var esc = 27.code_point.to_s var line = "\r{esc}[K* {name} [" @@ -125,9 +125,6 @@ ulimit -t {{{ulimit_usertime}}} 2> /dev/null end line += "] {done}/{tests.length}" - if more_message != null then - line += " " + more_message - end printn "{line}" end diff --git a/src/testing/testing_doc.nit b/src/testing/testing_doc.nit index a2fa067..1ca4deb 100644 --- a/src/testing/testing_doc.nit +++ b/src/testing/testing_doc.nit @@ -78,15 +78,15 @@ class NitUnitExecutor # All extracted docunits var docunits = new Array[DocUnit] - fun show_status(more_message: nullable String) + fun show_status do - toolcontext.show_unit_status(name, docunits, more_message) + toolcontext.show_unit_status(name, docunits) end fun mark_done(du: DocUnit) do du.is_done = true - show_status(du.full_name + " " + du.status_tag) + show_status end # Execute all the docunits diff --git a/src/testing/testing_suite.nit b/src/testing/testing_suite.nit index f755d25..9ea3a8e 100644 --- a/src/testing/testing_suite.nit +++ b/src/testing/testing_suite.nit @@ -132,9 +132,9 @@ class TestSuite # Test to be executed after the whole test suite. var after_module: nullable TestCase = null - fun show_status(more_message: nullable String) + fun show_status do - toolcontext.show_unit_status("Test-suite of module " + mmodule.full_name, test_cases, more_message) + toolcontext.show_unit_status("Test-suite of module " + mmodule.full_name, test_cases) end # Execute the test suite @@ -150,7 +150,7 @@ class TestSuite if not before_module == null then before_module.run for case in test_cases do case.run - show_status(case.full_name + " " + case.status_tag) + show_status end show_status