nitunit: remove `more_message` from status as it causes terminal overflow
authorJean Privat <jean@pryen.org>
Thu, 2 Jun 2016 21:31:08 +0000 (17:31 -0400)
committerJean Privat <jean@pryen.org>
Thu, 2 Jun 2016 21:58:34 +0000 (17:58 -0400)
Signed-off-by: Jean Privat <jean@pryen.org>

src/testing/testing_base.nit
src/testing/testing_doc.nit
src/testing/testing_suite.nit

index c24fc71..cb5db15 100644 (file)
@@ -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
 
index a2fa067..1ca4deb 100644 (file)
@@ -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
index f755d25..9ea3a8e 100644 (file)
@@ -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