diff options
author | Eric Wong <normalperson@yhbt.net> | 2011-11-08 10:23:21 +0000 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2011-11-08 10:23:21 +0000 |
commit | 5bd27a2ff2d5b32a4d6aa3115fda63127164d1e3 (patch) | |
tree | c0d727a20afa6da04ceb7d3b2e1bcfcf0388ddaf | |
parent | 4403d6936f72d8676f04799c419ca7f556b47bd1 (diff) | |
download | mogilefs-client-5bd27a2ff2d5b32a4d6aa3115fda63127164d1e3.tar.gz |
At least my year-old Rubinius installation does not
-rw-r--r-- | test/aggregate.rb | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/test/aggregate.rb b/test/aggregate.rb index b0a1a50..a495c52 100644 --- a/test/aggregate.rb +++ b/test/aggregate.rb @@ -1,14 +1,14 @@ -#!/usr/bin/ruby -n +#!/usr/bin/ruby # -*- encoding: binary -*- -BEGIN { $tests = $assertions = $failures = $errors = 0 } +$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 +STDIN.each_line do |l| + l =~ /(\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 -END { - printf("\n%d tests, %d assertions, %d failures, %d errors\n", - $tests, $assertions, $failures, $errors) -} +printf("\n%d tests, %d assertions, %d failures, %d errors\n", + $tests, $assertions, $failures, $errors) |