summaryrefslogtreecommitdiff
path: root/test/test_tracer.rb
diff options
context:
space:
mode:
authoryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-11-17 07:14:13 +0000
committeryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-11-17 07:14:13 +0000
commit3a0e9cb075fb91cb1aa8a9313e2f1e02654c8e44 (patch)
tree03ade931b4916815752c732346ea69ef5362d1d7 /test/test_tracer.rb
parent8903faf1a1e8cec44b3587a3cd88bf25cfe10515 (diff)
* test/test_tracer.rb: new test case. mimimal regression test for r29280.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29813 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/test_tracer.rb')
-rw-r--r--test/test_tracer.rb20
1 files changed, 20 insertions, 0 deletions
diff --git a/test/test_tracer.rb b/test/test_tracer.rb
new file mode 100644
index 0000000..2580205
--- /dev/null
+++ b/test/test_tracer.rb
@@ -0,0 +1,20 @@
+require 'test/unit'
+require_relative 'ruby/envutil'
+
+class TestTracer < Test::Unit::TestCase
+ include EnvUtil
+
+ def test_work_with_e
+ assert_in_out_err(%w[-rtracer -e 1]) do |(*lines),|
+ case lines.size
+ when 2
+ assert_match %r[#0:<internal:lib/rubygems/custom_require>:\d+:Kernel:<: -], lines[0]
+ when 1
+ # do nothing
+ else
+ flunk 'unexpected output from `ruby -rtracer -e 1`'
+ end
+ assert_equal "#0:-e:1::-: 1", lines[1]
+ end
+ end
+end