diff --git a/ChangeLog b/ChangeLog index 9c577fb1e9..d126845219 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Wed Nov 17 16:09:52 2010 Yuki Sonoda (Yugui) + + * test/test_tracer.rb: new test case. + mimimal regression test for r29280. + Wed Nov 17 16:04:23 2010 Yuki Sonoda (Yugui) * test/ruby/envutil.rb (Test::Unit::Assersions#assert_warn): diff --git a/test/test_tracer.rb b/test/test_tracer.rb new file mode 100644 index 0000000000..2580205338 --- /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::\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