From ae7a2fccfc2f91ba6828d8aaaa2dd8fc4c11fb40 Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Sat, 10 Mar 2018 12:46:59 +0100 Subject: [PATCH] test runner: don't remove trailing 0 when outputting failed IDs --- tests/test.d/controller.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test.d/controller.rb b/tests/test.d/controller.rb index 87f87d913..fe25d4629 100644 --- a/tests/test.d/controller.rb +++ b/tests/test.d/controller.rb @@ -171,12 +171,12 @@ class Controller entries = @dir_entries.collect do |entry| if (FileTest.file?(entry) && (entry =~ /^test-(\d+).*\.rb$/)) class_name = file_name_to_class_name entry - @results.status?(class_name) == :failed ? $1.to_i : nil + @results.status?(class_name) == :failed ? $1 : nil else nil end end - puts entries.reject(&:nil?).sort.map(&:to_s).join(" ") + puts entries.reject(&:nil?).sort_by(&:to_i).join(" ") end end