[SCM] ci-tooling packaging branch, master, updated. 9898d033e20fe2ff6c98fb0e3a830884b03a3fdd
Harald Sitter
apachelogger-guest at moszumanska.debian.org
Fri Oct 9 11:13:49 UTC 2015
Gitweb-URL: http://git.debian.org/?p=pkg-kde/ci-tooling.git;a=commitdiff;h=d599e09
The following commit has been merged in the master branch:
commit d599e09ed1c467d98918e5adf94c93d4f9d59869
Author: Harald Sitter <sitter at kde.org>
Date: Fri Oct 9 12:47:58 2015 +0200
add new result merge function
---
lib/lint/result.rb | 4 ++++
test/test_lint_result.rb | 9 +++++++++
2 files changed, 13 insertions(+)
diff --git a/lib/lint/result.rb b/lib/lint/result.rb
index c39dc7c..e504c78 100644
--- a/lib/lint/result.rb
+++ b/lib/lint/result.rb
@@ -19,6 +19,10 @@ module Lint
@warnings += other.warnings
@informations += other.informations
end
+
+ def all
+ @errors + @warnings + @informations
+ end
end
# Logs arary of results to stdout
diff --git a/test/test_lint_result.rb b/test/test_lint_result.rb
index c366762..fe521b2 100644
--- a/test/test_lint_result.rb
+++ b/test/test_lint_result.rb
@@ -44,4 +44,13 @@ class LintResultTest < TestCase
assert_equal(r1.warnings + r2.warnings, r3.warnings)
assert_equal(r1.informations + r2.informations, r3.informations)
end
+
+ def test_all
+ r = Lint::Result.new
+ r.valid = true
+ r.errors << 'error1' << 'error2'
+ r.warnings << 'warning1'
+ r.informations << 'info1' << 'info2'
+ assert_equal(%w(error1 error2 warning1 info1 info2), r.all)
+ end
end
--
ci-tooling packaging
More information about the pkg-kde-commits
mailing list