about summary refs log tree commit homepage
path: root/test/test_mwrap.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/test_mwrap.rb')
-rw-r--r--test/test_mwrap.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/test_mwrap.rb b/test/test_mwrap.rb
index 63d9e23..3de9c1b 100644
--- a/test/test_mwrap.rb
+++ b/test/test_mwrap.rb
@@ -146,4 +146,13 @@ class TestMwrap < Test::Unit::TestCase
       assert_operator total, :>=, calls
     end
   end
+
+  def test_benchmark
+    cmd = @@cmd + %w(-rbenchmark
+      -e puts(Benchmark.measure{1000000.times{Time.now}}))
+    r = IO.popen(@@env, cmd, 'r')
+    require 'benchmark'
+    warn Benchmark::Tms::CAPTION
+    warn r.read
+  end if ENV['BENCHMARK']
 end