summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rw-r--r--test/lib/minitest/unit.rb9
2 files changed, 10 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index bcbb418894..3a9011d6c7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+Sun May 25 12:32:42 2014 Tanaka Akira <akr@fsij.org>
+
+ * test/lib/minitest/unit.rb: Sort leaked threads and tempfiles.
+
Sun May 25 12:15:30 2014 Nobuyoshi Nakada <nobu@ruby-lang.org>
* signal.c (check_stack_overflow): fix condition to use ucontext
diff --git a/test/lib/minitest/unit.rb b/test/lib/minitest/unit.rb
index 6f686ac85e..49d3809cb9 100644
--- a/test/lib/minitest/unit.rb
+++ b/test/lib/minitest/unit.rb
@@ -964,15 +964,18 @@ module MiniTest
live2 = live_thread_and_tempfile
thread_finished = live1[0] - live2[0]
if !thread_finished.empty?
- puts "Finished threads: #{inst.class}\##{inst.__name__}:#{thread_finished.map {|t| ' ' + t.inspect }.join}"
+ list = thread_finished.map {|t| ' ' + t.inspect }.sort.join
+ puts "Finished threads: #{inst.class}\##{inst.__name__}:#{list}"
end
thread_retained = live2[0] - live1[0]
if !thread_retained.empty?
- puts "Leaked threads: #{inst.class}\##{inst.__name__}:#{thread_retained.map {|t| ' ' + t.inspect }.join}"
+ list = thread_retained.map {|t| ' ' + t.inspect }.sort.join
+ puts "Leaked threads: #{inst.class}\##{inst.__name__}:#{list}"
end
tempfile_retained = live2[1] - live1[1]
if !tempfile_retained.empty?
- puts "Leaked tempfiles: #{inst.class}\##{inst.__name__}:#{tempfile_retained.map {|t| ' ' + t.inspect }.join}"
+ list = tempfile_retained.map {|t| ' ' + t.inspect }.sort.join
+ puts "Leaked tempfiles: #{inst.class}\##{inst.__name__}:#{list}"
tempfile_retained.each {|t| t.unlink }
end
end