about summary refs log tree commit homepage
path: root/test/aggregate.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/aggregate.rb')
-rwxr-xr-xtest/aggregate.rb13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/aggregate.rb b/test/aggregate.rb
new file mode 100755
index 0000000..1c2cc5c
--- /dev/null
+++ b/test/aggregate.rb
@@ -0,0 +1,13 @@
+#!/usr/bin/ruby -n
+BEGIN { $tests = $assertions = $failures = $errors = 0 }
+
+$_ =~ /(\d+) tests, (\d+) assertions, (\d+) failures, (\d+) errors/ or next
+$tests += $1.to_i
+$assertions += $2.to_i
+$failures += $3.to_i
+$errors += $4.to_i
+
+END {
+  printf("\n%d tests, %d assertions, %d failures, %d errors\n",
+         $tests, $assertions, $failures, $errors)
+}